Professional Documents
Culture Documents
b) Inheritance
DEPARTMENT OF EDUCATION c) Compilation
d) Encapsulation
REGION VIII 9. What is not the use of “this” keyword in Java?
a) Referring to the instance variable when a local
DIVISION OF SAMAR variable has the same name
BASEY NATIONAL HIGH SCHOOL b) Passing itself to the method of the same class
Basey, Samar c) Passing itself to another method
d) Calling another constructor in constructor
JAVA PROGRAMMING chaining
(Senior High School) 10. Which of the following is a type of polymorphism
FIRST QUARTER EXAMINATION in Java Programming?
a) Multiple polymorphism
S.Y. 2022 – 2023 b) Compile time polymorphism
c) Multilevel polymorphism
d) Execution time polymorphism
11. What is Truncation in Java?
DIRECTION: Choose the Correct answer a) Floating-point value assigned to a Floating type
b) Floating-point value assigned to an integer type
c) Integer value assigned to floating type
1. Who invented Java Programming? d) Integer value assigned to floating type
a) Guido van Rossum 12. What is the extension of compiled java classes?
b) James Gosling a) .txt
c) Dennis Ritchie b) .js
d) Bjarne Stroustrup c) .class
2. Which statement is true about Java? d) .java
a) Java is a sequence-dependent programming 13. Which exception is thrown when java is out of
language memory?
b) Java is a code dependent programming a) MemoryError
language b) OutOfMemoryError
c) Java is a platform-dependent programming c) MemoryOutOfBoundsException
language d) MemoryFullException
d) Java is a platform-independent programming 14. Which of these are selection statements in Java?
language a) break
3. Which component is used to compile, debug and b) continue
execute the java programs? c) for()
a) JRE d) if()
b) JIT 15. Which of these keywords is used to define
c) JDK interfaces in Java?
d) JVM a) intf
4. Which one of the following is not a Java feature? b) Intf
a) Object-oriented c) interface
b) Use of pointers d) Interface
c) Portable 16. Which of the following is a superclass of every
d) Dynamic and Extensible class in Java?
5. Which of these cannot be used for a variable a) ArrayList
name in Java? b) Abstract class
a) identifier & keyword c) Object class
b) identifier d) String
c) keyword 17. Which of the below is not a Java Profiler?
d) none of the mentioned a) JProfiler
6. What is the extension of java code files? b) Eclipse Profiler
a) .js c) JVM
b) .txt d) JConsole
c) .class 18. Which of these packages contains the exception
d) .java Stack Overflow in Java?
7. Which environment variable is used to set the a) java.io
java path? b) java.system
a) MAVEN_Path c) java.lang
b) JavaPATH d) java.util
c) JAVA 19. Which of these statements is incorrect about
d) JAVA_HOME Thread?
8. Which of the following is not an OOPS concept in a) start() method is used to begin execution of the
Java? thread
b) run() method is used to begin execution of a
thread before start() method in special cases 27. _____ is used to find and fix bugs in the Java
c) A thread can be formed by implementing programs.
Runnable interface only
d) A thread can be formed by a class that extends
Thread class a. JVM
20. Which of these keywords are used for the block to
be examined for exceptions? b. JRE
a) check
b) throw c. JDK
c) catch
d) try d. JDB
21. Which one of the following is not an access
modifier?
a) Protected 28. Which of the following is a valid declaration of a
b) Void
c) Public char?
d) Private
22. What is the numerical range of a char data type in
a) char ch = '\utea';
Java?
a) 0 to 256
b) char ca = 'tea';
b) -128 to 127
c) 0 to 65535
c) char cr = \u0223;
d) 0 to 32767
23. Which class provides system independent server d) char cc = '\itea';
side implementation?
a) Server
b) ServerReader 29. What is the return type of the hashCode() method
c) Socket
d) ServerSocket in the Object class?
24. Which of the following option leads to the
portability and security of Java?
a. Object
a) Bytecode is executed by JVM
b. int
b) The applet makes the Java code secure and
c. long
portable
a) Dynamic a) ABH8097
d) Object-oriented d) 0xnf029L
26. The \u0021 article referred to as a 31. What does the expression float a = 35 / 0 return?
c) Hexadecimal c) Infinity
c) 20 d) 25 c. Abstraction
d. Multi-threading
33. Which of the following tool is used to generate
API documentation in HTML format from doc
comments in source code? 38. Which of the following is true about the anonymous
inner class?
a. javap tool
visible items and multiple selections abled? 39. Which package contains the Random class?
35. Which of the following for loop declaration is 40. What do you mean by nameless objects?
not valid?
a. An object created by using the new keyword.
a. for ( int i = 99; i >= 0; i / 9 )
b. An object of a superclass created in the subclass.
b. for ( int i = 7; i <= 77; i += 7 )
c. An object without having any name but having a
c. for ( int i = 20; i >= 2; - -i ) reference.
______.
a. getClass()
a. Runnable Interface
b. intern()
b. Marker Interface
c. getName()
c. Abstract Interface
d. toString()
d. CharSequence Interface
37. In which process, a local variable has the same
Panel class?
a. Runnable interface
d. Dialog class
48. Which of the following is a reserved keyword in Java?
b. String memory
c. Heap memory