Anda di halaman 1dari 4

1.

Immutable
classes can Mark for Review
be (1) Points
subclassed.
True or
false?

True
False (*)

Correct

2. An interfaces can declare public constants.


True or False? Mark for Review
(1) Points

True (*)
False

Incorrect. Refer to Section 2 Lesson 1.

3. Interfaces define what?


Mark for Review
(1) Points

Variables and methods


All method definitions without any implementations (*)
Constants and all methods with implementations
All methods with implementations
Some methods with implementations

Correct

4. Which two statements are equivalent to line 2?


(Choose Two) 1. public interface Account{ Mark for Review
2. int accountID=100; (1) Points
3. }

(Choose all correct answers)

private int accountID=100;


Final int accountID=100; (*)
Abstract int accountID=100;
protected int accountID=100;
static int accountID=100; (*)

Correct
5. An interface can implement methods.
True or False? Mark for Review
(1) Points

True
False (*)

Incorrect. Refer to Section 2 Lesson 1.

6. Wildcards
in Mark for Review
generics (1) Points
allows us
greater
control
on the
types
that can
be used.
True or
False?

True (*)
False

Correct

7. < ? extends Animal > is an example of a bounded generic wildcard.


True or False? Mark for Review
(1) Points

True (*)
False

Correct

8. < ? > is an example of a bounded generic wildcard.


True or False? Mark for Review
(1) Points

True
False (*)

Correct

9. Which of the following would initialize a generic class "Cell" using a String
type? Mark for Review
I. Cell <String> cell = new Cell(); . (1) Points
II. Cell <String> cell = new Cell <String>(); .
III. Cell cell = new String;

I only
I and II (*)
II only
II and III
III only

Correct

10. Enumerations (enums) must be declared in their own class.


True or False? Mark for Review
(1) Points

True
False (*)

Correct
6. Wildcards
in Mark for Review
generics (1) Points
allows us
greater
control
on the
types
that can
be used.
True or
False?

True (*)
False

Correct

7. < ? extends Animal > is an example of a bounded generic wildcard.


True or False? Mark for Review
(1) Points

True (*)
False

Correct

8. < ? > is an example of a bounded generic wildcard.


True or False? Mark for Review
(1) Points

True
False (*)

Correct
9. Which of the following would initialize a generic class "Cell" using a String
type? Mark for Review
I. Cell <String> cell = new Cell(); . (1) Points
II. Cell <String> cell = new Cell <String>(); .
III. Cell cell = new String;

I only
I and II (*)
II only
II and III
III only

Correct

10. Enumerations (enums) must be declared in their own class.


True or False? Mark for Review
(1) Points

True
False (*)

Correct

Anda mungkin juga menyukai