Hofstra – University College Continuing Education
Intro to Java Programming
Fill in the blanks:
1. The “final” keyword is used to _______________________________ ,
_______________________________ and _______________________________
2. The method that has no method body should be declared _______________
3. Method signature is composed of _________________________________________
4. A method throws an exception using the _____________ keyword.
5. A method is declared to throw an exception using the ____________ keyword.
6. Exceptions that are subclasses of RuntimeException is considered _____________ exceptions.
7. Exceptions that are not subclasses of RuntimeException is considered __________ exceptions.
8. ArrayOufOfBoundsException is an example of ________________ exception.
True / False:
1. _____ Static fields can be accessed from non-static methods.
2. _____ Each object has it’s copy of a static field
3. _____ An abstract class is required to have at least one abstract method.
4. _____ An class is required to be abstract if it has an abstract method.
5. _____ If a class implements an interface, it has to provide an implementation for each method
that is defined in that interface.
6. _____ Interfaces can extend other interfaces
7. _____ Interfaces can only have final fields, and abstract method declarations
8. _____ All exception classes extend the java.lang.Exception.
9. _____ If a method throws an exception, this is required to be specified in the method
declaration at all times.
10. _____ A catch block is required after a try block.
11. _____ A finally block is required after a try-catch block.
12. _____ Try-catch block is required if the method called is declared to throw an exception.