Search Header Logo

Collections

Authored by Jose Diaz

Computers

1st Grade

Used 3+ times

Collections
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Identify examples of autoboxing. Please select 3 options.

Float f = 2.0;

Float f = 2.0f;

Byte b = 2;

Character c = 2;

String s = "x";

2.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Identify examples of auto-unboxing. Please select 2 options.

int getValue(){ return new int[]{ 1 }; }

new ArrayList<Integer>().add(1);

List<Integer>.of(1, 2, 3 );

int ival = optionalInt.get(); //assuming optionalInt is of type Optional<Integer>

long lv = Integer.valueOf(10);

3.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Which interfaces does java.util.NavigableMap extend directly or indirectly? . Please select 2 options.

java.util.SortedSet

java.util.SortedMap

java.util.TreeMap

java.util.List

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Please select 1 option.

1

2

3

4

None of these

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Please select 1 option.

[b]

[c]

[b, c, a]

[a, b, c, a]

Exception at runtime

6.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Which of these implementations for collection framework interfaces are provided in the standard JDK?. Please select 3 options.

TreeMap

ArrayMap

HashSet

ArrayList

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Please select 1 option.

ArrayList<Vehicle> al1 = new ArrayList<>();
al1.add(new SUV());

ArrayList<Drivable> al2 = new ArrayList<>();
al2.add(new Car());

ArrayList<Drivable> al3 = new ArrayList<>();
al3.add(new SUV());

ArrayList<SUV> al4 = new ArrayList<>();
al4.add(new Car());

ArrayList<Vehicle> al5 = new ArrayList<>();
al5.add(new Car());

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?