Search Header Logo

Object Oriented Programming Model Quiz

Authored by Baby Shamini P

Computers

University

Used 4+ times

Object Oriented Programming Model Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Both class Error and class Exception are children of this parent:

A.Throwable

B. Catchable

C.Runnable

D. Problem

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What type of exception is thrown by parseInt() if it gets illegal data?

A. ArithmeticException

B. RunTimeException

C.NumberFormatException

D.NumberError

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following lists exception types from MOST specific to LEAST specific?

A.Error, Exception

B. Exception, RunTimeException

C.Throwable, RunTimeException

D. ArithmeticException, RunTimeException

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which statement is true?

A.If an exception is uncaught in a method, the method will terminate and normal execution will resume.

B. An overriding method must declare that it throws the same exception classes as the method it overrides.

C. The main() method of a program cannot declare that it throws checked exceptions.

D.A method declaring that it throws a certain exception class may throw instances of any subclass of that exception class.

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

When is a finally{} block executed?

A.Only when an unhandled exception is thrown in a try{} block.

B. Only when any exception is thrown in a try{} block.

C.Always after execution has left a try catch{} block, no matter for what reason

D. Always just as a method is about to finish.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

On occurrence of which of the following is it possible for a program to recover?

A. Errors

B. Exceptions

C.Both errors and exceptions

D. Neither

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method should a non-abstract class implementing Runnable interface implement?

A.start

B. run

C.runnable

D.wait

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?

Discover more resources for Computers