Terms R E V T
100
In java is a feature that helps to reuse the methods and variables of one class in another class
Inheritance
100
Name the 3 type of exceptions.
checked -unchecked- errors
100
Under which condition will the Scanner constructor generate a FileNotFoundException?
If the input file does not exist
100
To prevent uexpecthed termination of the program, exceptions do not need to be handled
False
100
used during exceptions; consists of statements that must be executed at any cost
Finally
200
It is the parent class or base class from which a new class inherits the properties or methods
Superclass
200
Private, public, and protected are all
access modifiers
200
What are the three categories of exceptions that are the subclass of the Throwable class?
Runtime, Exception, Error
200
How many keywords are there in java that are used for exception handling and what are they?
 1.try.
 2.catch.
 3.finally.
 4.throw.
 5.throws.
200
What is used to declare a variable as a constant...
Final
300
The class that extends the parent class is a
Subclass
300
What are the 4 types of inheritance?
1. Single Inheritance
2.Multilevel Inheritance
3.Hierarchial Inheritance
4.Hybrid Inheritance
300
____ and____-are unchecked exceptions; all other exceptions are checked.
Runtime and Error
300
To append data in a existing file you can use what class?
File writer
300
Which of the following statements about using the PrintWriter object is correct?
If the output file already exists, the existing data will be discarded before new data are written into the file.
400
a keyword that supports inheritance
extends
400
This is the simple type of inheritance in java where one class extends another class. From the pictorial representation, we can understand that class A is the base class and class B is the subclass.
Single Inheritance
400
This type of exception is out of a scope of an application and it's not possible to forsee or recover them.
Errors
400
RuntimeException class is a _____ of the Exception class
SubClass
400
In this type of inheritance in java, the child class itself becomes a parent class of another class. From the below diagram we can understand that class A is the parent class and class B is the child class. But class B is again the parent class of class C which is the child class.
Multilevel Inheritance
500
a keyword that denotes a method, constructor, or variable of a parent class.
Super
500
In the context of error handling in Java, an “Error” is:
An exceptional case that is out of the scope of the program, cannot be caught by the program, and from which it is not possible to recover.
500
The child class itself becomes a parent
class of another class is what type of Inheritance:
Multilevel Inheritance
500
What are the 2 rules that must be kept in mind while using try block with multiple catch blocks?
o At the time only one exception occurs and only one catch block is executed.
o The multiple catch blocks must be ordered from most specific to most general
500
is a special method that gets called during object creation of a class.
Constructor






Quiz Review

Press F11 for full screen mode



Limited time offer: Membership 25% off


Clone | Edit | Download / Play Offline