Filters
Question type

Study Flashcards

If two methods in the same class have the same name but different signatures, the second overrides the first.

A) True
B) False

Correct Answer

verifed

verified

When a subclass extends a superclass, the public members of the superclass become public members of the subclass.

A) True
B) False

Correct Answer

verifed

verified

If a subclass constructor does not explicitly call a superclass constructor __________.


A) it must include the code necessary to initialize the superclass fields
B) the superclass fields will be set to the default values for their data types
C) Java will automatically call the superclass's default or no-arg constructor immediately after the code in the subclass's constructor executes
D) Java will automatically call the superclass's default or no-arg constructor just before the code in the subclass's constructor executes

E) C) and D)
F) A) and B)

Correct Answer

verifed

verified

Every class has a toString method and an equals method inherited from the Object class.

A) True
B) False

Correct Answer

verifed

verified

Showing 61 - 64 of 64

Related Exams

Show Answer