Showing posts with label JAVA INTERVIEW QUESTIONS. Show all posts
Showing posts with label JAVA INTERVIEW QUESTIONS. Show all posts

Thursday, 19 June 2014

TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 5





INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 5





1. Automatic conversion from priitive type to an object of the corresponding wrapper class is called

(A)  coercing
(B)  casting
(C) boxing
(D) widening 



2.  The fact that any program can print using system.out.print , implies that 

(A)  system is defined in the package java.lang
 (B) system is a class name
(C) out is an object 
(D) print is a method 



CLICK HERE TO SEE THE ANSWER

ANSWER IS  (A) , (B), (C) AND (D)


3. Which of the following are valid identifers?

(A) $ABC 
(B) _____(5 consecutive underscores)
(C) main
(D) protected



CLICK HERE TO SEE THE ANSWER

ANSWER IS (A) ,(B) AND (C)

TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 4






     TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 4





1. Exceptions that are expected to possibly occur are called

(A)  checked exceptions
(B) unchecked eceptions
(C) runtime exceptions
(D) errors



2. The following statements

String wer = "12\u3456\u78910 ";
System .out .println (wer. lenght());


(A)  print 4
(B) print 13
(C) print5
(D) print 15



3.Garbage collectors frees the programmer from worrying about

(A) memory leaks
(B) dangling refrences
(C) creating new objects
(D)  recursion




TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 3






TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 3




1.The given statements

   double whatIsThis = -1.0/0.0;
    system .out .println(whatIsThis);


(A) -Math .floor(-x)
(B)  -Math .cell(-x)
(c)  prints -Infinity
(D)  prints a garbage value




2.Math .cell(X) has the same value as


(A)  -Math .floor(-x)
(B) -Math .cell(-x)
(C) -Math .floor(-x)
(D) -Math .cell(x)




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


(A)  m x 2^4        (B)  4m             (C)   m^4              (D)   4+ m




TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 2


  

TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA 
 SET 2




1. Consider the following statement

    system .out.print ( math .round (math .random()));

This can print


(A)  only 0
(B) only 1
(C) only 0 or 1
(D) Any non-negative integer




2. Is null an object?


(A)  Yes
(B) No
(C) Sometimes yes
(D) None of these




3. Which of the following is used to get the error message for exception that was thrown?


(A) printMessage 
(B) extractMessage
(C) thrownMessage 
(D)  getMessage




4. Subclass is also called as

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)  ! , || , && , *