OPP Revision Unit I & II

OPP Revision Unit I & II

University

35 Qs

quiz-placeholder

Similar activities

Chapter 2.2.2 RFID Technology

Chapter 2.2.2 RFID Technology

7th Grade - University

35 Qs

Quiz-Applied OS

Quiz-Applied OS

University

40 Qs

Usability Engineering Quiz

Usability Engineering Quiz

University

40 Qs

Subhasish Sir QUIZ

Subhasish Sir QUIZ

University

31 Qs

Quiz on Lesson 1 CSU3200

Quiz on Lesson 1 CSU3200

University

33 Qs

 Internet Basics Quiz

Internet Basics Quiz

6th Grade - University

30 Qs

Exploring Relational Data Concepts

Exploring Relational Data Concepts

University

30 Qs

T-SQL and Common Table Expression

T-SQL and Common Table Expression

University

30 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?