To save time during technical interviews or time limited coding tasks it's better to memorize such statements, to not wast time every time on googling it.
Some of them may look silly but I always had hard time remembering it.
Based on my experience I found following snippets inclredible usefull:
Arrays.toString(array)list.toArray(new String[0]);Arrays.sort(twoDim, (a1,a2) -> a2[0] - a1[0]);//desc
Arrays.sort(twoDim, (a1,a2) -> a1[0] - a2[0]);//ascArrays.sort(strings, Comparator.comparing(s -> s.length()));PriorityQueue<Integer> maxPQ = new PriorityQueue<Integer>(Collections.reverseOrder());Arrays.copyOf(a, a.length);
Arrays.copyOfRange(original, int from, int to);//to is exclusiveInteger.toBinaryString(i)str.toCharArray();Arrays.stream(array).boxed().collect(Collectors.toList())