
Java-QUIZ-PSGRK
Authored by saranya pravin
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the advantage of Exception Handling?
To avoid abnormal termination of a program
To find out errors
To Debug program
None of these
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following key word is optional in Exception handling program?
try
catch
finally
throw
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What is the purpose of 'throw' keyword?
To Raise an exception explicitly
To Raise an exception implicitly
To create user defined exceptions
To create custom exceptions
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following statements should be used to import Exception Class?
import java.io.*
import java.lang.*
import java.util.*
import java.lang.Exception.*
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Choose an exception if there's an attempt to divide number by zero...
int number = 89 / 0;
System.out.println("The answer is " + number);
ArithmeticException
NullPointerException
NumberFormatException
ArrayIndexOutOfBoundException
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
WHAT IS THE OUTPUT?
public class Foo
{
public static void main(String[] args)
{
try
{
return;
}
finally
{
System.out.println( "Finally" );
}
}
}
Finally
Compilation fails.
The code runs with no output
An exception is thrown at runtime.
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which will contain the body of the thread in Java?
Start()
Run()
Main()
Execute()
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Review Quiz (Chapter 3&4)
Quiz
•
University
20 questions
C Programming Unit-1 Test-2
Quiz
•
University
10 questions
C++ Array Quiz
Quiz
•
University
10 questions
Microsoft Word
Quiz
•
University
20 questions
Java Quiz 1
Quiz
•
University
15 questions
Computer Applications in Banking and Finance Quiz
Quiz
•
University
20 questions
MESYUARAT KE-3 MYTECC ASSEMBLY: TOGETHER WE BIND
Quiz
•
University
10 questions
Software Testing
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade