Thursday, 19 June 2014

TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 1






TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA
 SET 1




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


(A)  boolean
(B)  byte
(c)  string
(D)double




2. The given statement 

byte var = ~9
system.out.println(var);


(A)  prints -9
(B)  prints -10
(C) prints -119
(D) prints 118




3. The operators || , && , * , ! , if arranged in the ascending order of precendence, read


(A)  && , || , * , !

(B) || , && , * , !
(C)  || , && , ! , *
(D)  ! , || , && , *







4. The given statement 

   system .out.print((double) 7/4);

prints

(A) 1.75
(B) 1
(C) 1.0 
(D)  2.0




5. What is the environment variable  that contains a list of direction where java looks for classes referernced in a program?

(A)  PATHCLASS   
(B) SEARCHATH
(C) PATHDIR
(D) CLASSPATH


No comments:

Post a Comment