I have taken an int[] as input. For searching the index of an integer in the array I used Arrays.asList(arr).indexOf(element) method. However, I am getting index as -1 even if the element is present in the array.
Arrays.asList(int_array).indexOf(int_element) returns -1 even if element is present java [duplicate]
-
1Post the code and sample data for which you get this output.Sanket Makani– Sanket Makani2017-06-14 09:52:58 +00:00Commented Jun 14, 2017 at 9:52
Add a comment
|