Sunday, 9 November 2014

Java Quiz Question and Answers - Part 2

                       Java Quiz Exam Oriented

 Answers are marked with light yellow.
Question 1: In a single java file, we can have _________ number of classes.
Select one:a. 3
b. 1
c. 4
d. any

Question 2: default is a keyword in java
Select one:
True
False

Question 3: Which of these statements is correct?
Select one:
a. true and false are non numeric values.
b. true and false are numeric values 0 and 1.
c. true is any non zero value and false is 0.
d. true and false are numeric values 1 and 0.

Question 4: Which of these statements are incorrect?
Select one:
a.
Assignment operators are more efficiently implemented by Java run­time system than their equivalent long forms.

b. Assignment operators can be used only with numeric and character data type. Incorrect
c. None
d. Assignment operators run faster than their equivalent long forms.

Question 5: Which of these statement is incorrect?
Select one:

a. Applets do not require a main() method at all.
b. Every class must contain a main() method.
c. There can be only one main() method in a program.
d. main() method must be made public.

Question 6: What is the range of data type short in Java?
Select one:

a. -128 to 127
b. -32768 to 32767
c. -2147483648 to 2147483647
d. None of the mentioned

Question 7: public class Test { }
During compilation, it generates default one argument constructor.
Select one:

True
False


Question 8:
which methods we can call with class name?
Select one:a. native
b. static
c. synchronized.
d. instance

Continued ...






0 comments:

Post a Comment