We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaGuide/docs/java/new-features/java21.md
Line 201 in 76e4dba
The text was updated successfully, but these errors were encountered:
JavaGuide/docs/java/new-features/java21.md Line 201 in 76e4dba System.out.println(linkedHashSet.reversed()); //Prints [5, 3, 2, 1, 0]
System.out.println(linkedHashSet.reversed()); //Prints [5, 3, 2, 1, 0]
感谢指出,这里笔误了:
LinkedHashSet<Integer> linkedHashSet = new LinkedHashSet<>(List.of(1, 2, 3)); Integer firstElement = linkedHashSet.getFirst(); // 1 Integer lastElement = linkedHashSet.getLast(); // 3 linkedHashSet.addFirst(0); //List contains: [0, 1, 2, 3] linkedHashSet.addLast(4); //List contains: [0, 1, 2, 3, 4] System.out.println(linkedHashSet.reversed()); //Prints [4, 3, 2, 1, 0]
Sorry, something went wrong.
No branches or pull requests
JavaGuide/docs/java/new-features/java21.md
Line 201 in 76e4dba
The text was updated successfully, but these errors were encountered: