Quiz: Java 7
This quiz will cover everything you covered in Java 7 category.
1
How do you declare an ArrayList named “strings” that contains only objects of type String
(in Java 7+)?
A)
List <String> strings = new ArrayList<>();
B)
List strings = new ArrayList<>();
C)
List <String> strings = new ArrayList<>;
D)
List strings = new ArrayList<>;
Question 1 of 30 attempted
Get hands-on with 1400+ tech skills courses.