Latest Govt Job Notification Sarkari Naukri Employment News 2018

JAVA Programming MCQ Questions Answers Download PDF

JAVA Programming Language MCQ Questions Answers Download PDF Solved Set

JAVA MCQ JAVA Programming Language MCQ Questions Answers Download PDF Set

1) Which of the following is not a primitive data type?

a) Boolean

b) byte

c) string

d) double

View Answer

2) What is the output of this program?


b) 236

c) 326

d) 362

View Answer

3) Is null an object?

a) Yes

b) No

c) Sometimes yes

d) None of these

View Answer

4) Let m be a variable of datatype byte. The value of m <<4 is same as

a) m x 24

b) 4m

c) m4

d) 4 + m

View Answer

5) Which of the following statement will result in compilation error?

a) signed int abc;

b) unsigned int abc;

c) signed byte abc;

d) signed long abc;

View Answer

6) Which of the following operators take (s) only integer operands?


b) ++ (post-increment)

c) ++(pre-increment)

d)none of these

View Answer

7) Which of the following doesn’t have a superclass?


b) Object

c) Lang

d) Exception

View Answer

8) Elements of an array have the same

a) index

b) vsalue

c) datatype

d) scope

View Answer

9) Constant that cannot be changed are declared using the keyword

a) final

b) static

c) absatract

d) immutable

View Answer

10) Which of the following can be used to copy data from one array to another?

a) System.clone

b) java.lang.toCopy

c) System.arraycopy


View Answer

11) Which of the following operator don’t always evaluate all their operator?

a) &&

b) &

c) ?:

d) I I

View Answer

12) How much of storage does a character (represented in Unicode) need?

a) 1 byte

b) 4 byte

c) 3 byte

d) 2 byte

View Answer

13) Which of the following access specifiers is usually used with used with inheritance?

a) public

b) private

c) protected

d) package

View Answer

14) Which of the following operators act only integer operator?

a) <<

b) >>>

c) & (bitwise AND)

d) No such operator exists in Java.

View Answer

15) Which of the following keywords is used to declare exceptions that can possibly occur?

a) handle

b) throws

c) checked

d) manage

View Answer

16) Which of the following packages needs to be important to use the StringTokenizer class


b) java.util

c) java.lang


View Answer

[fbcomments] © 2018        Home     About Us     Sitemap     Disclaimer     Privacy Policy     Contact us