Last active
November 29, 2020 02:23
-
-
Save mingliangguo/a73b3255e60878fc6f3ed20585fa5f44 to your computer and use it in GitHub Desktop.
Java lambda java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[] nums = new int[]{3, 5, 9, 2, 6}; | |
nums = IntStream.of(nums).boxed().sorted(Comparator.reverseOrder()).mapToInt(i -> i).toArray(); | |
List<Integer> list = new ArrayList<>(); | |
int[] arr = list.stream().mapToInt(i -> i).toArray(); | |
// convert array to string | |
Arrays.toString(new int[]{1, 2, 3}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment