1 What data type will not allow the following code snippet to compile?
byte x = 5;
byte y = 10;
_____ z = x + y;
A) int B) long C) boolean D) double
2 Which of the following option leads to the portability and security of
Java?
A) Bytecode is executed by JVM B) Applet
C) Exception Handling D) Dynamic Binding
3 Which of the following is not a Java features?
A) Dynamic B) Architecture Neutral
C)Use of pointers D) Object-oriented
4 Which keyword is used for accessing the features of a package?
A)package B) import
C)extends D) export
5 What is the extension of compiled java classes?
A).txt B).js
C) .class D) .java
6 Which of these are selection statements in Java?
A) break B) continue
C) for D) if ()
7 Which of these keywords is used to define interfaces in Java?
A)intf B) Intf
C) interface D) Interface
8 Which of the following is a superclass of every class in Java?
A) ArrayList B) Abstract
Class
C) Object Class D) String
9 What is the numerical range of a char data type in Java?
A) 0 to 256 B) -128 to 127
C)0 to 65535 D) 0 to 32767
10 Which of the following is a valid declaration of an object of class
Box?
A)Box obj = new Box(); B) Box obj = new Box;
C) obj = new Box(); D) new Box obj;
11 ____________________________ is used to find and fix bugs in the Java programs.
12 JVM stands for ________________________________________________________
13 “+=” known as __________________________________________________in Java.
14 _____________________________________is the size of a SHORT integer in Java
15 ASCII stands for ________________________________________________________
16 _____________________________ is the other name for Relational Operators in
Java?
17 An Array in Java is a collection of elements of ______________________ data type.
18 It is possible to skip initializing some elements of the array during Shorthand
Initialization. (TRUE / FALSE)________________________
19 To successfully overload a method in Java, the argument-list or parameter-list must
be _________________________ (same/different).
20 Can you access a default member of a class from a class of outside current package
in Java? (yes/no) __________________________
1 For compiling java code which tool is used [ ]
A).Javac B).Java C).Javadoc D).jar
2 Java is said to be in Programming [ ]
A) compiled B) Interpreted C) Both a&b D)None
3 Which of the following is not key component of object-oriented
programming? [ ]
A) Inheritance B) Encapsulation
C)Polymorphism D)Parallelism
4 Which of the keyword is used in subclass to call the constructor of super
class? [ ]
A) super class B)mainC)super D)extends
5 Functions which are declared in class are called____ [ ]
A) member variables B) data functions
C) member functions D) all the above
6 Which of the following variables cannot be inherited? [ ]
A) public B) static C) private D)protected
7 Which of these keywords is used by a class to use an interface? [ ]
A) import B) Imports C) Implement D) None
8 Correct Syntax to import the package is______ [ ]
A) import package packagename B) import*package
C) import packagename D) import package
9 In Java, a library of classes is called as______ [ ]
A) folder B) package C)directory D)an application
10 Which of these packages contain classes and interfaces used for
performing Input/output operations? [ ]
A) [Link] B) [Link] C) [Link] D)all the above
11 __________is a access specifier that can be used for an interface
12 Size of int in java is __________ bit.
13 __________ Keyword must be used to inherit a class
14 Java Virtual machine takes____________ as input and produces output
15 _______________ is supported by method overriding in java
16 ____________ Keyword is used to prevent inheritance of a class
17 Interfaces help java to achieve ____________ inheritance.
18 Automatic deletion of already allocated but unused memory is
called_________________.
19 A __________ class is a class that has at least one abstract method
20 _____________ Keyword is used to define packages in java.