Deva Point

deva point

Our Latest Programming Tutorial

Easy To Learning

Java Test Module for Interview

Java Test Module for Interview

1.            The Java source code can be created in a Notepad editor.

                A.  True

                B.  False

2.            The Java Program is enclosed in a class definition.

                A.  True

                B.  False

3.            Java supports multidimensional arrays.

                A.  True

                B.  False

4.            The ++ operator is used for incrementing and the — operator is used for decrementing.

                A.  True

                B.  False

5.            The switch statement does not require a break.

                A.  True

                B.  False

6.            All the classes in java.lang package are automatically imported when a program is compiled.

                A.  True

                B.  False

7.            Constructors can be overloaded like regular methods.

                A.  True

                B.  False

8.            A constructor is automatically called when an object is instantiated.

                A.  True

                B.  False

9.            Find the keyword which is not used to implement exception.

                A. try

                B. catch

                C. finally

                D. access             

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.

                A.            Constant

                B.            Reference

                C.            Identifier

                D.            Modifi

13.          Keywords and Identifiers are same.

                A.            True

                B.            False

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____________.

                A             bytecode

                B             byte

                C             byteclass

                D             bytejava

16.          _____________ operator is used to create an object.

                A             class

                B             new

                C             print

                D             main

17.          Which of the following is NOT a Java Keyword?

                A             abstract

                B             native

                C             package

                D             synchronize

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

                D             API

19.          Which of the following is not a looping statement ____________?

                A             For

                B             Switch

                C             While

                D             dowhi

20.          _____________ is a multi-way branch statement.

                A             switch

                B             continue

                C             break

                D             label

21.          he ______ statement is used inside the switch to terminate the sequence.

                A             break

                B             jump

                C             exit

                D             goto

22.          A class that is inherited is called a ____________.

                A             superclass

                B             subclass

                C             subsetclass

                D             relativeclass

23.          A/An _________ determines the features of a class that may be used by other classes.

                A             specifier

                B             inheritance

                C             implementation

                D             access specifier

24.          Which property of Java allows the creation of hierarchical classifications?

                A             interface

                B             inheritance

                C             robust

                D             distributed

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 ____________.

                A             common

                B             throwable

                C             NULL

                D             catch

27.          Find the keyword which is not used to implement exception.

                A             try

                B             catch

                C             finally

                D             access

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.

                A.  True

                B.  False

Published
Categorized as Java

Leave a comment

Your email address will not be published. Required fields are marked *