2nd Quarterly Long Test in Programming JAVA
2nd Quarterly Long Test in Programming JAVA
Part I. FILL IN THE BLANKS. Identify what is being referred to in each statement. Write you answer on the space
provided.
Part II. IDENTIFICATION. Identify the following statement and write the answer on the space provided.
Part III. True of False. Write TRUE if the statement is correct and write FALSE if not.
____________26. AutoCloseable interface characterizes an object that keeps its resources until it is close.
____________27. File handler and socket handler are good examples of AutoCloseable Interface.
____________28. AutoCloseable interface summoned spontaneously when it is implemented by a close() method of an
object.
____________29. A number of resources are declared when the user uses the try-with-resources statement.
____________30. A resource is an object that is utilizes in program and must be closed when the program ends.
____________31. The catch block comprises a block of codes within which an exception might happen.
Building Skills, Creating Opportunities
TRANSFORMATION Ӏ DISCIPLINE Ӏ EXCELLENCE
ASKI Skills and Knowledge Institute, Inc.
Talavera Agricultural and Social Enterprise Training Center (TASEC)
Brgy. Sampaloc, Talavera 3114, Nueva Ecija, Philippines
____________32. A try block should be bracketed with the try block.
____________33. Multiple catch block is used to execute several tasks at the occurrence of same exceptions.
____________34. A catch block that is created for grabbing the class exception can grab all other exceptions.
____________35. If multiple catch block exists, it should be located at the first observing exception handling best
practices.
Answer key:
I. 11. Serial 27. True
1. enum, enum(enumerated 12. Parallel 28. True
types) 13. Current Mark Sweep (CMS). 29. True
2. constants 14. G1 30. True
3. uppercase 15. Ergonomics 31. False
4. static 16. Orig.lastIndexOf() 32. False
5. iteration 17. removeCharAt() 33. False
6. Virtual method 18. replace() 34. True
7. non-static method 19. stringBuffer() 35. False
8. polymorphic 20. Java new generic collection
9. Method overriding 21. Collection
10.parent 22. framework
23. Java Collection Framework
(JCF)
24. compile time error
25. FileOutputStream
III.
II. 26. True