15. Java Abstract Classes

15. Java Abstract Classes

University

22 Qs

quiz-placeholder

Similar activities

Java thread - MCQ

Java thread - MCQ

University

18 Qs

Final Quiz

Final Quiz

University

20 Qs

Inheritance in Java

Inheritance in Java

University

20 Qs

300 Quiz03

300 Quiz03

University

18 Qs

Quiz 1 PBO

Quiz 1 PBO

University

20 Qs

Generics

Generics

University

20 Qs

Java Quiz

Java Quiz

University

25 Qs

Q9 ABSTRACTION IN JAVA

Q9 ABSTRACTION IN JAVA

University

20 Qs

15. Java Abstract Classes

15. Java Abstract Classes

Assessment

Quiz

Computers

University

Hard

Created by

A Vijay Kumar

Used 79+ times

FREE Resource

22 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Abstract class can have

Abstract methods

Methods with code implementation

Used to create objects

Used to create subclasses

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an abstract method?

An abstract method is any method in an abstract class.

An abstract method is a method which cannot be inherited.

An abstract method is one without a body that is declared with the reserved word abstract.

n abstract method is a method in the child class that overrids a parent method.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can an abstract class define both abstract methods and non-abstract methods?

No—it must have all one or the other.

No—it must have all abstract methods.

Yes—but the child classes do not inherit the abstract methods.

Yes—the child classes inherit both.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these class relies upon its subclasses for complete implementation of its methods?

Object class

abstract class

ArrayList class

None of the mentioned

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these keywords are used to define an abstract class?

Abstract

abstract

abstract class

abst

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is FALSE about abstract classes in Java

If we derive an abstract class and do not implement all the abstract methods, then the derived class should also be marked as abstract using 'abstract' keyword

Abstract classes can have constructors

A class can be made abstract without any abstract method

A class can inherit from multiple abstract classes.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statement(s) with regard to an abstract class in JAVA is/are TRUE ? I. An abstract class is one that is not used to create objects. II. An abstract class is designed only to act as a base class to be inherited by other classes.

Only I

Only II

Neither I nor II

Both I & II

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?