oops

oops

University

16 Qs

quiz-placeholder

Similar activities

MIDTERM EXAM

MIDTERM EXAM

University

18 Qs

Java Class and Object Quiz

Java Class and Object Quiz

University

15 Qs

Java Access Modifiers Quiz

Java Access Modifiers Quiz

University

20 Qs

Intro to  Java

Intro to Java

University

15 Qs

Java Debugging Questions - M

Java Debugging Questions - M

University

15 Qs

JAVA FUNDAMENTALS

JAVA FUNDAMENTALS

University

12 Qs

execption handling

execption handling

University

17 Qs

MSDS

MSDS

University

20 Qs

oops

oops

Assessment

Quiz

Other

University

Hard

Created by

Niveditha N

Used 1+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which can have both abstract and non-abstract methods?

Interface

Abstract Class

Enum

None of the above

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What keyword is used to implement an interface?

extend

derive

implement

implements

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which one supports multiple inheritance in Java?

Class

Abstract class

Interface

Constructor

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Can abstract class have private or protected members?

Yes

No

Only public

Only static

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which is true?

Abstract class can implement an interface

Interface can extend a class

Abstract class must be final

Interface can have constructors

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following statements about constructors is TRUE?

Constructors can be inherited

Constructors can be overridden

Constructors cannot be final

Constructors can return a value

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will happen if a subclass overrides a method and gives it more restrictive access?

Code compiles fine

Runtime error

Compile-time error

JVM will ignore it

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?