Terms | R | E | V | T |
---|---|---|---|---|
In java is a feature that helps to reuse the methods and variables of one class in another class
Inheritance
|
Name the 3 type of exceptions.
checked -unchecked- errors
|
Under which condition will the Scanner constructor generate a FileNotFoundException?
If the input file does not exist
|
To prevent uexpecthed termination of the program, exceptions do not need to be handled
False
|
used during exceptions; consists of statements that must be executed at any cost
Finally
|
It is the parent class or base class from which a new class inherits the properties or methods
Superclass
|
Private, public, and protected are all
access modifiers
|
What are the three categories of exceptions that are the subclass of the Throwable class?
Runtime, Exception, Error
|
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. |
What is used to declare a variable as a constant...
Final
|
The class that extends the parent class is a
Subclass
|
What are the 4 types of inheritance?
1. Single Inheritance
2.Multilevel Inheritance 3.Hierarchial Inheritance 4.Hybrid Inheritance |
____ and____-are unchecked exceptions; all other exceptions are checked.
Runtime and Error
|
To append data in a existing file you can use what class?
File writer
|
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.
|
a keyword that supports inheritance
extends
|
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
|
This type of exception is out of a scope of an application and it's not possible to forsee or recover them.
Errors
|
RuntimeException class is a _____ of the Exception class
SubClass
|
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
|
a keyword that denotes a method, constructor, or variable of a parent class.
Super
|
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.
|
The child class itself becomes a parent
class of another class is what type of Inheritance:
Multilevel Inheritance
|
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 |
is a special method that gets called during object creation of a class.
Constructor
|