Exception, Abstraction

Exception, Abstraction

University

7 Qs

quiz-placeholder

Similar activities

Cuestionario sobre Proceso de Ingeniería de Requisitos

Cuestionario sobre Proceso de Ingeniería de Requisitos

University

8 Qs

Introduction Quiz

Introduction Quiz

University

10 Qs

Electric Heating Quiz

Electric Heating Quiz

University

10 Qs

CIVILWAR DAY 24 - KWA (ESTIMATION,FM)

CIVILWAR DAY 24 - KWA (ESTIMATION,FM)

1st Grade - University

10 Qs

SWE312 Chapter 9

SWE312 Chapter 9

University

11 Qs

TrashketballElectricReview

TrashketballElectricReview

9th Grade - University

10 Qs

Science Quiz

Science Quiz

12th Grade - University

10 Qs

MGT315-Chapter 1: Thinking Skills_Quiz!

MGT315-Chapter 1: Thinking Skills_Quiz!

University

8 Qs

Exception, Abstraction

Exception, Abstraction

Assessment

Quiz

Engineering

University

Practice Problem

Hard

Created by

Arti Sonawane

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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