Search Header Logo

Java Interfaces Quiz

Authored by Ms STAFF

Computers

Professional Development

Used 1+ times

Java Interfaces Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about interfaces in Java?

Interfaces can have instance variables

Interfaces can have abstract methods

Interfaces can be instantiated

Interfaces cannot be implemented by classes

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used by a class to implement an interface?

extends

implements

imports

package

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can an interface extend another interface in Java?

Yes, using extends keyword

Yes, using implements keyword

No, interfaces cannot extend

Only abstract classes can extend interfaces

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following members can an interface have?

Abstract methods

Static methods

Default methods

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default access modifier of methods in an interface?

private

public

protected

default (package-private)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can an interface contain constructors?

Yes

No

Only static constructors

Only protected constructors

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a class implements multiple interfaces, it is called:

Multilevel inheritance

Multiple inheritance

Hierarchical inheritance

Hybrid inheritance

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?