Method Overloading and Overriding Quiz

Method Overloading and Overriding Quiz

12th Grade

20 Qs

quiz-placeholder

Similar activities

Object Oriented Programming

Object Oriented Programming

12th Grade

18 Qs

Mastering Object Oriented Programming

Mastering Object Oriented Programming

12th Grade

20 Qs

Java Knowledge Check

Java Knowledge Check

12th Grade

20 Qs

UAS Teori PBO CE-2C Tahun 2021

UAS Teori PBO CE-2C Tahun 2021

1st Grade - University

20 Qs

Network Address Translation (NAT)

Network Address Translation (NAT)

12th Grade

20 Qs

Principles of programming Languages

Principles of programming Languages

12th Grade - University

15 Qs

Unit 4 - Conditions and Logic

Unit 4 - Conditions and Logic

12th Grade

17 Qs

OOP Java

OOP Java

12th Grade

20 Qs

Method Overloading and Overriding Quiz

Method Overloading and Overriding Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

DR MURTHY

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about method overloading?

Method overloading is based on different parameter lists.

Method overloading requires inheritance.

Method overloading requires overriding superclass methods.

Method overloading requires a final modifier.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In method overloading, which of the following must differ for methods with the same name?

Return type

Method name

Parameter list

Access modifier

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT true about method overriding?

Method overriding requires inheritance.

Overriding methods must have the same name and parameter list.

The access level of the overriding method can be more restrictive than the overridden method.

The return type of the overriding method must be compatible with the overridden method.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Method overriding is an example of which type of polymorphism?

Compile-time polymorphism

Runtime polymorphism

Static binding

None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In method overloading, the return type of overloaded methods:

Must be the same.

Must be different.

Can be different but is not necessary.

Must be void.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following modifiers cannot be used in an overridden method in Java?

final

private

static

All of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In method overriding, the access level of the overriding method:

Must be the same as that of the overridden method.

Can be more restrictive than the overridden method.

Can be more accessible than the overridden method.

Does not matter.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Computers