OOP Long Quiz

OOP Long Quiz

12th Grade

17 Qs

quiz-placeholder

Similar activities

MP1 Test 1 - Objects Classes and Methods

MP1 Test 1 - Objects Classes and Methods

9th - 12th Grade

15 Qs

JAVA FUNDAMENTALS

JAVA FUNDAMENTALS

9th - 12th Grade

20 Qs

Python Functions

Python Functions

12th Grade

15 Qs

U2L7 Accessor Methods by Mr. B

U2L7 Accessor Methods by Mr. B

12th Grade

15 Qs

OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

Django-quiz

Django-quiz

5th Grade - University

20 Qs

Unit 4 - Conditions and Logic

Unit 4 - Conditions and Logic

12th Grade

17 Qs

XII_CS_FUNCTIONS

XII_CS_FUNCTIONS

12th Grade

15 Qs

OOP Long Quiz

OOP Long Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Riggs Manuel Sacdalan

Used 18+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which part of a method declaration is optional and specifies that the method cannot be overridden by a subclass?

Return type

Access modifier

Optional specifier

Method body

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the return type in a method declaration?

To specify whether the method can be accessed outside its class

To define the name of the method

To indicate the data type of the value returned by the method or void if no value is returned

To list the parameters the method accepts

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a method declaration, what does the access modifier private specify?

The method can be accessed by all classes everywhere

The method can only be accessed within its own package

The method can only be accessed within its own class

The method can be accessed by subclasses in other packages

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which part of a method declaration is required and defines what the method does?

Access modifier

Parameter list

Method name

Exception list

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the method body in a method declaration?

To list the method's parameters

To specify the access level of the method

To include the code that defines what the method does

To declare exceptions that the method might throw

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which part of the method declaration is used to indicate that a method belongs to the class rather than an instance of the class?

Access modifier

Return type

Static keyword

Method name

7.

MULTIPLE CHOICE QUESTION

1 min • 3 pts

Media Image

What will be the output of the following code?

00

0

10

1

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?