I have an array as the integer I want to convert her to List without the use of loops
int[] arrya={1,2,3,4,5};
//List<Integer> myList=Arrays.asList(arrya);
I have an array as the integer I want to convert her to List without the use of loops
int[] arrya={1,2,3,4,5};
//List<Integer> myList=Arrays.asList(arrya);
You can make use of streams
int[] arrya={1,2,3,4,5};
List<Integer> list = Arrays.stream(arrya).boxed().collect(Collectors.toList());