0% found this document useful (0 votes)
29 views

2nd Quarterly Long Test in Programming JAVA

This document appears to be a test on Java programming concepts taken by a student. It contains 3 parts: Part I asks the student to identify 10 concepts related to Java programming such as enum being used for collections of constants and virtual methods being non-static methods that can be overridden. Part II contains 25 identification questions asking the student to identify terms like lastIndexOf() and replace() string methods or Serial garbage collection. Part III contains 15 true/false questions covering exceptions, resources, and catch blocks. The answer key at the bottom provides the answers to all questions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

2nd Quarterly Long Test in Programming JAVA

This document appears to be a test on Java programming concepts taken by a student. It contains 3 parts: Part I asks the student to identify 10 concepts related to Java programming such as enum being used for collections of constants and virtual methods being non-static methods that can be overridden. Part II contains 25 identification questions asking the student to identify terms like lastIndexOf() and replace() string methods or Serial garbage collection. Part III contains 15 true/false questions covering exceptions, resources, and catch blocks. The answer key at the bottom provides the answers to all questions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ASKI Skills and Knowledge Institute, Inc.

Talavera Agricultural and Social Enterprise Training Center (TASEC)


Brgy. Sampaloc, Talavera 3114, Nueva Ecija, Philippines

2nd Quarterly Long Test in Programming Java


2nd Semester, SY. 2020-2021
Name: ________________________________________________ Score: _________________
Grade & Section: ________________________________________________ Date: _________________

Part I. FILL IN THE BLANKS. Identify what is being referred to in each statement. Write you answer on the space
provided.

1. To define collection of constants, Java uses a special type known as ___________________________________.


2. Enum keyword signifies a distinct data type that allows a variable to belong to a set of predefined
___________________________.
3. The values defined within an enum are constants and shall be entered in ___________________________ letters.
4. If an enum is a member of a class, then it is indirectly classified as __________________________.
5. The user can also use enum in ____________________________ to obtain an array of possible values.
6. ____________________________ is a function or method whose actions can be superseded within an inheriting
class by a function with similar signature.
7. Every ____________________________ is normally a virtual method excluding final and private methods.
8. Methods that cannot be inherited for ____________________________ actions are not a virtual method.
9. ____________________________ occurs when a subclass has similar method declared in the parent class.
10. A subclass offers the precise implementation of the method that has been offered by one of its
____________________________ class.

Part II. IDENTIFICATION. Identify the following statement and write the answer on the space provided.

________________________11. It operates by keeping every application threads.


________________________12. It is sometimes termed as throughout collector.
________________________13. This garbage collector utilizes multiple threads to examine the heap memory to indicate
instances for removal and then clear the indicated instances.
________________________14. This garbage collector is utilized for sizeable heap memory areas.
________________________15. It is described as the capacity of the JVM to spontaneously choose heap size, garbage
collector, and type of virtual machine (server or client).
________________________16. This is the method that reveals the last position of a substring inside a string.
________________________17. This is the method that deletes a character from a precise position from a string.
________________________18. This is the method of the string class that can be used to replace character or substring by
new one.
________________________19. This is the method that buffers the input string, revers the buffer, and then transforms the
buffer into a string with the aid of toString() method.
________________________20. It permits user to take only one type of object in collection.
________________________21. It signifies a distinct unit of objects (a group).
________________________22. It offers ready-made architecture and it denotes a set of classes and interface.
________________________23. It represents an integrated architecture for saving and handling a group of objects.
________________________24. If you attempt to include another type of object, its present what kind of error?
________________________25. It is an output stream for entering data to a file.

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

Building Skills, Creating Opportunities


TRANSFORMATION Ӏ DISCIPLINE Ӏ EXCELLENCE

You might also like