PACKAGES AND INTERFACE ONE LINER PART 02
1) User-defined package can also be imported just like the standard packages.
True/False
Ans : True
2) When a program does not want to handle exception, the ______class is used.
Ans : Throws
3) The main subclass of the Exception class is _______ class.
Ans : RuntimeException
4) Only subclasses of ______class may be caught or thrown.
Ans : Throwable
5) Any user-defined exception class is a subclass of the _____ class.
Ans : Exception
6) The catch clause of the user-defined exception class should ______ its Base class catch clause.
Ans : Exception
7) A _______ is used to separate the hierarchy of the class while declaring an Import statement.
Ans : Package
8) All standard classes of Java are included within a package called _____.
Ans : java.lang
9) All the classes in a package can be simultaneously imported using ____.
Ans : *
10) Can you define a variable inside an Interface. If no, why? If yes, how?
Ans.: YES. final and static
True/False
Ans : True
2) When a program does not want to handle exception, the ______class is used.
Ans : Throws
3) The main subclass of the Exception class is _______ class.
Ans : RuntimeException
4) Only subclasses of ______class may be caught or thrown.
Ans : Throwable
5) Any user-defined exception class is a subclass of the _____ class.
Ans : Exception
6) The catch clause of the user-defined exception class should ______ its Base class catch clause.
Ans : Exception
7) A _______ is used to separate the hierarchy of the class while declaring an Import statement.
Ans : Package
8) All standard classes of Java are included within a package called _____.
Ans : java.lang
9) All the classes in a package can be simultaneously imported using ____.
Ans : *
10) Can you define a variable inside an Interface. If no, why? If yes, how?
Ans.: YES. final and static
No comments:
Post a Comment