interface and abstract class

interface and abstract class

Professional Development

11 Qs

quiz-placeholder

Similar activities

PreTraining4PillarsOOP

PreTraining4PillarsOOP

Professional Development

10 Qs

Research Game

Research Game

Professional Development

10 Qs

Title of scientific paper

Title of scientific paper

11th Grade - Professional Development

11 Qs

Talent Next Quiz-5

Talent Next Quiz-5

Professional Development

10 Qs

Creational Design Patterns

Creational Design Patterns

Professional Development

10 Qs

ERW_Day 5_Final quiz

ERW_Day 5_Final quiz

University - Professional Development

10 Qs

Java Quiz1 Basics and OOPS

Java Quiz1 Basics and OOPS

Professional Development

10 Qs

Java Quiz - Easy

Java Quiz - Easy

Professional Development

10 Qs

interface and abstract class

interface and abstract class

Assessment

Quiz

Professional Development

Professional Development

Hard

Created by

Assistant Chennai

Used 147+ times

FREE Resource

11 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

Inheritance is used when the relationship between two classes is a(n) _______ relationship.
"HAS-A"
"PART-OF-A"
"IS-A"
inverse

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these class is super class of every class in Java?

String class

Object class

ArrayList class

Abstract class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these keywords can be used to prevent inheritance of a class?

super

constant

extends

final

7.

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

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?