Java Test Module for Interview
1. The Java source code can be created in a Notepad editor.
2. The Java Program is enclosed in a class definition.
3. Java supports multidimensional arrays.
4. The ++ operator is used for incrementing and the — operator is used for decrementing.
5. The switch statement does not require a break.
6. All the classes in java.lang package are automatically imported when a program is compiled.
7. Constructors can be overloaded like regular methods.
8. A constructor is automatically called when an object is instantiated.
9. Find the keyword which is not used to implement exception.
10. JVM stands for.
A. Java Verified Machine
B. Java Virtual Machine
C. Java Very large Machine
D. Java Very small Machine
11. What are the pillars of OOPS concept?
A. Abstraction,Inheritance, Encapsulation, Polymorphism
B. Atomicity, Inheritance, Encapsulation, Polymorphism
C. Abstraction, Inheritance, Polymorphism
D. None of the Above
12. ___________ is a name given to a variable, class or method.
13. Keywords and Identifiers are same.
14. _ is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the __________.
A Bytecode, Java Virtual Machine
B Data Code, Java machine
C Source code, Microsystems
D Bytecode, Microsystem
15. A compiler converts the Java program into an intermediate language representation called____________.
16. _____________ operator is used to create an object.
17. Which of the following is NOT a Java Keyword?
18. Java platform consists of JVM and a package of readymade software components. This package is known as ___________.
A Java API
B JVM API
C JM API
19. Which of the following is not a looping statement ____________?
20. _____________ is a multi-way branch statement.
21. he ______ statement is used inside the switch to terminate the sequence.
22. A class that is inherited is called a ____________.
23. A/An _________ determines the features of a class that may be used by other classes.
D access specifier
24. Which property of Java allows the creation of hierarchical classifications?
25. Which of the following is WRONG statement with respect to rules for overriding methods?
A The method name and the order of arguments should be identical to that of the super class method
B The return type of both the methods must be the different
C The overriding method cannot be less accessible than the method it overrides
D An overriding method cannot raise more exceptions than those raised by the super class
26. The class at the top of the exception classes’ hierarchy is called ____________.
27. Find the keyword which is not used to implement exception.
28. Which of the following is not an exception in Java?
A Arithmetic Exception
B Nullpointer Exception
C ArrayoutofBounds Exception
D Logical Exception
29. Which of the following definitions hold good for exception?
A Abnormal event that occurs during program execution and disrupts the normal flow of Instruction
B The unexpected situations that may occur during program execution
C The term exception denotes an exception event.
D All the above
30. What are the two basic units of execution?
A Multitasking and Multiprocessing
B Synchronizing and interrupt
C Multitasking and Synchronizing
D Processes and threads
31. The for loop repeats a set of statements a certain number of times until a condition is matched.