OPP Revision Unit I & II

OPP Revision Unit I & II

University

35 Qs

quiz-placeholder

Similar activities

PSAS Pemrograman Web

PSAS Pemrograman Web

11th Grade - University

40 Qs

may 25 ex n t rep

may 25 ex n t rep

10th Grade - University

30 Qs

Ôn tập tổng hợp HTML/CSS/JS

Ôn tập tổng hợp HTML/CSS/JS

University

35 Qs

Human-Computer Interaction (HCI) Prelims

Human-Computer Interaction (HCI) Prelims

University

30 Qs

System Administrator Activities Quiz

System Administrator Activities Quiz

University

40 Qs

Living in the IT Era Chapter 1- Lesson 2

Living in the IT Era Chapter 1- Lesson 2

University

30 Qs

OSS (QUIZ 4) CPU Scheduling Quiz

OSS (QUIZ 4) CPU Scheduling Quiz

University

30 Qs

2nd Quiz

2nd Quiz

University

40 Qs

OPP Revision Unit I & II

OPP Revision Unit I & II

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

Vidhi Pitroda

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...

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of an abstract class in Java?

To provide a complete implementation

To provide partial implementation

To define a contract for subclasses

To allow instantiation of objects

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to declare an abstract method?

abstract

final

static

void

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? class A { void display() { System.out.println("Hello"); } } A a = new A(); a.display();

Hello

Error

Hello World

Nothing

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about interfaces in Java?

Interfaces can be instantiated

Interfaces can have constructors

Interfaces can contain instance fields

Interfaces can extend multiple other interfaces

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'super' keyword in Java?

To define a new class

To access private members of a class

To call a method from the parent class

To create a new instance of a class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if a subclass does not implement all abstract methods of its superclass?

The superclass will be ignored

The subclass will compile successfully

The subclass must also be declared abstract

The program will run with errors

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about packages is true?

Packages are not necessary in Java

Packages cannot be nested

Packages help avoid naming conflicts

Packages can only contain classes

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?