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
lists
:
Content language: English
Русский
What is the result of compilation and running the following code? import java.util.*; public class Test { public static void main(String[] args) { List list = new ArrayList<String>(); for (int i = 0; i < 10; i++) { list.add(i + ""); } for (Object e1 : list) { for (Object e2 : list) { if (e1.equals(e2)) { list.remove(e1); list.remove(e2); } } } System.out.println(list.size()); } }
lists
Indexed collections: Arrays and typed Arrays
lists
← Prev
1
2
3
Next →
Sign Up Now
or
Subscribe for future quizzes