Search Header Logo

OOP Quiz #2

Authored by inocencio madriaga

Computers

University

Used 24+ times

OOP Quiz #2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Composition is a


uses-a relationship

has-a relationship

is-a relationship

none of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Select the access level/s of a private modifier.

Class

Package

Subclass

World

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an instance of a class?

Class

  • Object

  • Reference

  • Primitive

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of a primitive int data type?

-1

null

0

garbage data

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the given code. What would be the display on the screen?

Class A

Class B

Class C

Compile error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When Overloading does not occur?


More than one method with same name but different method signature and different number or type of parameters

More than one method with same name, same signature but different number of signature

More than one method with same name, same signature, same number of parameters but different type

More than one method with same name, same number of parameters and type but different signature

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these keywords can be used to prevent Method overriding?

static

constant

protected

final

Access all questions and much more by creating a free account

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

Already have an account?