Tag: Generics
-
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 reverse all the data values in an Array
This is the second solution to reverse all the data values in an Array. This solution uses Java Generics, which defines a Generic method for reversing given Array data values. This solution modifies the same array, and the resultant array has all the data values reversed. The data values are of any type such as…
-
How to find reverse of an integer and string data value
This is the fourth solution to find the reverse of an integer or string data value by using the Generics. The internal logic of the Generic method uses the reverse method of StringBuffer class.
