2nd Summative-Test-Java-11-for 2nd Quarter

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Table of Specification

JAVA PROGRAMMING NCII


SUMMATIVE TEST

MELCS No. of No. of


Days/Hour Items
s
LO 3. Examine Object-Oriented Concepts and
Terminology
5 6
3.1 Java Class and Objects
(TLE_ICTJAVA1 12POADIIId-g-31)
LO 3. Examine Object-Oriented Concepts and
Terminology
5 6
3.1Java Methods
(TLE_ICTJAVA11-12POAD-IIf-i-29)
LO 3. Examine Object-Oriented Concepts and
Terminology
5 6
3.2 Java Constructor
(TLE_ICTJAVA11-12POAD-IIj-IIIa-c-30)
LO 3. Examine Object-Oriented Concepts and
Terminology
3.2 Java Strings 5 7
(TLE_ICTJAVA11-12POAD-IIf-i-29)

Total 20 25
SUMMATIVE TEST
JAVA Programming

Name:______________________________________ Grade and Section:_____________________

Direction: Read carefully the given questions and choose the correct answer. Write your
answer on the answer sheet provided.

1.It is a blueprint for the object. So, we first need to define this before we create an object.
a. Class b. Object c. Room d. Subclass
2. We can think of the class as a sketch (prototype) of a house. It contains all the details about
the floors, doors, windows, etc. Based on these descriptions we build the house. House is the?
a. Class b. Object c. Room d. Subclass
3. Since many houses can be made from the same description, we can create many objects
from this.
a. Class b. Object c. Room d. Subclass
4. These are known as access modifiers.
a. Class and Object c. State and Behavior
b. Private and Public d. Idle and Breaking
5. Fields and methods of a class are also called?
a. Members of the class c. Members of the school
b. Members of the object d. Members of the output
6. It is a block of code that performs a specific task.
a. Directions b. Methods c. Program d. Syntax
7. We can create our own method based on our requirements.
a. Standard Library Methods c. User-defined Methods
b. Standard Syntax Methods d. User interface Methods
8. These are built-in methods in Java that are available to use..
a. Standard Library Methods c. User-defined Methods
b. Standard Syntax Methods d. User interface Methods
9. It specifies what type of value a method returns. For example if a method has an int return
type then it returns an integer value.
a. modifier b. method name c. method body d. returnType
10. It is an identifier that is used to refer to the particular method in a program.
a. modifier b. method name c. method body d. returnType
11. It includes the programming statements that are used to perform some tasks. The method
body is enclosed inside the curly braces { }.
a. modifier b. method name c. method body d. returnType
12.  It defines access types whether the method is public, private, and so on.
a. modifier b. method name c. method body d. returnType

13. If we use this keyword, it can be accessed without creating objects.


a. Modifier c. Static
b. Parameter1/parameter2 d. Return
14. These are values passed to a method. We can pass any number of arguments to a method.
a. Modifier c. Static
b. Parameter1/parameter2 d. Return
15. A Java method may or may not return a value to the function call. We use this
statement to return any value.
a. recall b. retype c. redo d. return
16. If a constructor does not accept any parameters, it is known as a?
a. Arg Constructor c. No-Arg Constructor
b. Default Constructor d. Parameterized Constructor
17. A Java constructor can also accept one or more parameters. Such constructors are known
as?
a. Arg Constructor c. No-Arg Constructor
b. Default Constructor d. Parameterized Constructor
18. If we do not create any constructor, the Java compiler automatically create a no-arg
constructor during the execution of the program. This constructor is called?
a. Arg Constructor c. No-Arg Constructor
b. Default Constructor d. Parameterized Constructor
19. A constructor cannot be abstract or static or final.
a. True b. False c. Partly True d. Partly False
20. A constructor can be overloaded but cannot be overridden.
a. True b. False c. Partly True d. Partly False
21. To find the length of a string, we use this to calculates the total number of characters in
the string and returns it.
a. Length b. Length() c. length d. length()
22. We can join two strings in Java using this method.
a. Concat b. Concat() c. concat d. concat()
23. In Java, we can make comparisons between two strings using this method.
a. Equals b. Equals() c. equals d. equals()
24. Replaces the specified old character with the specified new character.
a. Replace b. Replace() c. replace d. replace()
25. Returns the position of the specified character in the string.
a. Indexof() b. Indexof c. IndexOf() d. indexOf()
ANSWER KEY IN JAVA

1. A
2. B
3. A
4. B
5. A
6. B
7. C
8. A
9. D
10. B
11. C
12. A
13. C
14. B
15. D
16. C
17. D
18. B
19. A
20. A
21. D
22. D
23. D
24. D
25. D

You might also like