Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
TreeSet
:
Content language: English
Русский
What will be printed out as a result of the following code execution? import java.util.TreeSet; public class TestTreeSet { public static void main(String[] args) { TreeSet<Item> set = new TreeSet<Item>(); set.add(new Item(2)); set.add(new Item(5)); set.add(new Item(2)); System.out.println(set); } static class Item { int n; Item(int n) { this.n = n; } public String toString() { return "Item " + n; } } }
TreeSet
← Prev
1
Next →
Sign Up Now
or
Subscribe for future quizzes