Grokking Java Intermediate
Vote

0% completed

​

Quiz

Quiz

Question 1

Consider the following code snippet:

import java.util.HashSet;

public class Test {
    public static void main(String[] args) {
        HashSet<Integer> set = new HashSet<>();
        set.add(10);
        set.add(20);
        set.add(10);
        System.out.println(set.size());
    }
}

What is the output?

Click an option to answer

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content