[go: up one dir, main page]

0% found this document useful (0 votes)
98 views10 pages

Midterm Quiz 2

- The document describes the results of a 20 question multiple choice quiz on abstract classes and interfaces in Java. - The quiz was completed on February 2, 2022 between 4:18 AM and 4:21 AM and took 3 minutes and 33 seconds to finish. - All 20 questions were answered correctly, with a total score of 20 out of 20 (100%).

Uploaded by

RianneNael
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views10 pages

Midterm Quiz 2

- The document describes the results of a 20 question multiple choice quiz on abstract classes and interfaces in Java. - The quiz was completed on February 2, 2022 between 4:18 AM and 4:21 AM and took 3 minutes and 33 seconds to finish. - All 20 questions were answered correctly, with a total score of 20 out of 20 (100%).

Uploaded by

RianneNael
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Started on Wednesday, 2 February 2022, 4:18 AM

State Finished
Completed on Wednesday, 2 February 2022, 4:21 AM
Time taken 3 mins 33 secs
Marks 20.00/20.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00

Flag question

Question text
The variables declared in an interface are public, static & final by default.

Select one:
a.
True
b.
False

Question 2
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Have methods and variables just like the class but the methods declared in it are by default
abstract.

Select one:
a.
Interface
b.
Abstract class
c.
Abstract method
d.
Override

Question 3
Correct
Mark 1.00 out of 1.00

Flag question

Question text
An abstract class can be instantiated.

Select one:
a.
False
b.
True

Question 4
Correct
Mark 1.00 out of 1.00

Flag question

Question text
An abstract class has no use until unless it is extended by some other class.

Select one:
a.
True
b.
False

Question 5
Correct
Mark 1.00 out of 1.00
Flag question

Question text
Extending an interface can implement another interface.

Select one:
a.
True
b.
False

Question 6
Correct
Mark 1.00 out of 1.00

Flag question

Question text
You can not have abstract method in a concrete class.

Select one:
a.
False
b.
True

Question 7
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Interface provides full abstraction as none of its methods have body.
Select one:
a.
False
b.
True

Question 8
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Nested interface are also known as?

Select one:
a.
Outer interface
b.
Map interface
c.
Inner interface
d.
Abstract interface

Question 9
Correct
Mark 1.00 out of 1.00

Flag question

Question text
If you declare an abstract method in a class then you don't need to declare the class
abstract as well.

Select one:
a.
False
b.
True

Question 10
Correct
Mark 1.00 out of 1.00

Flag question

Question text
An abstract class must be extended and in a same way abstract method must be overridden.

Select one:
a.
False
b.
True

Question 11
Correct
Mark 1.00 out of 1.00

Flag question

Question text
The class that implements interface must implement all the methods of that interface.

Select one:
a.
True
b.
False

Question 12
Correct
Mark 1.00 out of 1.00
Flag question

Question text
A class that is declared using abstract keyword.

Select one:
a.
Child class
b.
Parent class
c.
Concrete class
d.
Abstract class

Question 13
Correct
Mark 1.00 out of 1.00

Flag question

Question text
If a child does not implement all the abstract methods of abstract parent class, then the
child class must need to be declared abstract as well.

Select one:
a.
True
b.
False

Question 14
Correct
Mark 1.00 out of 1.00
Flag question

Question text
Abstract method has no body.

Select one:
a.
True
b.
False

Question 15
Correct
Mark 1.00 out of 1.00

Flag question

Question text
A class derived from the abstract class must implement all those methods that are declared
as abstract in the parent class.

Select one:
a.
False
b.
True

Question 16
Correct
Mark 1.00 out of 1.00

Flag question

Question text
A class which is not abstract is referred as.
Select one:
a.
Concrete class
b.
Parent class
c.
Abstract class
d.
Child class

Question 17
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Class that implements any interface must implement all the methods of that interface, else
the class should be declared abstract.

Select one:
a.
True
b.
False

Question 18
Correct
Mark 1.00 out of 1.00

Flag question

Question text
An interface can implement another interface

Select one:
a.
False
b.
True

Question 19
Correct
Mark 1.00 out of 1.00

Flag question

Question text
We can instantiate an interface in java.

Select one:
a.
False
b.
True

Question 20
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Interface which is declared inside another interface or class.

Select one:
a.
Multiple interface
b.
Hierarchical interface
c.
Nested interface
d.
Implementation interface

You might also like