Java Programming Questions

Java Programming Questions

Java Programming Interview Questions

Learn Java programming questions with answers for Exams and interview.these multiple choice questions(MCQ) consists of 4 answers.the right answer is highlighted and underlined.

1)How many keywords are available in java

a)35

b)55

c)50

d)130

 

2)Smallest individual unit in java program is known as

a)string

b)literal

c)token

d)operator

 

3)What is byte code in the context of Java?

a)The type of code generated by a Java compiler

b)The type of code generated by a Java Virtual Machine

c)It is another name for a Java source file

d)It is the code written within the instance methods of a class.

e)It is another name for comments written within a program.

 

4)What is garbage collection in the context of Java?

a)The operating system periodically deletes all of the java files available on the

system.

b)Any package imported in a program and not used is automatically deleted.

c)When all references to an object are gone, the memory used by the object is

automatically reclaimed.

d)The JVM checks the output of any Java program and deletes anything that

doesn’t make sense.

 

5)Which is not an integer data type?

a.)  Single

b.)  Byte

c.)  Short

d.)  Integer

e.)  Long

 

6)Which is a numeric data type?

a.)  Floating point

b.)  Integer

c.)  Boolean

d.)  Both a and b.

e.)  All of the above.

Pages 1 2 3 4 5 6 7

Share