Exception, Abstraction

Exception, Abstraction

University

7 Qs

quiz-placeholder

Similar activities

MAE FYP Report Workshop

MAE FYP Report Workshop

University

10 Qs

prog 1 hell

prog 1 hell

University

10 Qs

Let's play!

Let's play!

University

6 Qs

Power Management in IoT Devices

Power Management in IoT Devices

University

10 Qs

Interfaces de Usuario

Interfaces de Usuario

University

8 Qs

PHP-MySQL

PHP-MySQL

University

10 Qs

Sem III- OOP Module 4  (2024-25)

Sem III- OOP Module 4 (2024-25)

University

9 Qs

Arrays in Java

Arrays in Java

University

11 Qs

Exception, Abstraction

Exception, Abstraction

Assessment

Quiz

Engineering

University

Hard

Created by

Arti Sonawane

Used 1+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an abstract method?

To define static behavior

To hide all functionality

To provide a method without implementation

To override superclass method

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of exception is NullPointerException?

Checked

Unchecked

Compile-time

Custom

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to manually throw an exception?

throws

throw

exception

raise

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about interfaces in Java?

interfaces cannot have methods

interfaces can have constructors

interfaces can have static and default methods

Interface methods are private by default

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about abstract classes in Java?

An abstract class can be instantiated

An abstract class cannot have any method

An abstract class can have both abstract and non-abstract methods

All methods in an abstract class must be abstract

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not true about static methods?

They can access only static variables directly

They can call non-static methods directly

They belong to the class, not objects

They can be called without creating an object

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can an abstract method be private?

Only if the class is final

Only in interfaces

yes

no