Tag: generic method
-
How to find intersection values of two Arrays
This is the second solution to find the intersection of two Arrays of integers or Strings or Characters. This program has one Generic method which accepts two arrays of any data type (Integers or Strings or Characters). The internal logic is comparing each value of the first array with each of value of the second…
-
How to find Nth largest number in an array
This is the third solution to find the Nth largest number from an array of given integers or doubles or strings. This program defines one generic functional interface, with multiple Lambda expressions utilizes the same based on the data type. The internal logic utilizes the sort method of the Arrays class.
