Exception, Abstraction

Exception, Abstraction

University

7 Qs

quiz-placeholder

Similar activities

Pressure Sensor Quiz

Pressure Sensor Quiz

University

11 Qs

Understanding Python Classes and Objects

Understanding Python Classes and Objects

University

6 Qs

VLSI QUIZ

VLSI QUIZ

University

12 Qs

java

java

University

2 Qs

Python Object-Oriented Programming Quiz

Python Object-Oriented Programming Quiz

University

10 Qs

INTRODUCCIÓN - FLEXSIM 1.0

INTRODUCCIÓN - FLEXSIM 1.0

University

10 Qs

c# practice

c# practice

University

11 Qs

PHP-MySQL

PHP-MySQL

University

10 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