Showing posts with label Java question. Show all posts
Showing posts with label Java question. Show all posts

Friday, 18 August 2017

30 Java Coding Questions To Assess Programming Skills part 3 ~ foundjava

Question-24. Which Of The Following Would The Below Java Coding Snippet Return On Execution?

A. 1 
B. 2 
C. 3 
D. Compilation error
Check correct option.

Question-25. Which Of The Following Values Would The Below Java Coding Snippet Yield?

A. 199
B. 199.5 
C. 200
D. Invalid number
Check correct option.

Question-26. Which Of The Following Combinations Would The Below Program Print?

A. ABCDEFG, ABCDEFG 
B. ABCDEFG, ZBCDEFG 
C. ZBCDEFG, ABCDEFG 
D. ZBCDEFG, ZBCDEFG
Check correct option.

Question-27. Which Of The Following Values Would The Below Java Coding Snippet Print?

A. Java 
B. ArrayIndexOutOfBoundsException 
C. Quiz 
D. Compilation error
Check correct option.

Question-28. What Would The Below Java Coding Snippet Print On Execution?

A. Exception 
B. Final 
C. ExceptionFinal 
D. Compilation error
Check correct option.

Question-29. What Does The Following Java Coding Snippet Print On Execution?

A. Compilation fails. 
B. 3 
C. 2 
D. 99
Check correct option.

Question-30. What Would Be The Output Of The Below Java Coding Snippet Upon Execution?

A. Runtime Exception 
B. thread-1 thread-2 
C. thread-2 thread-1 
D. Sometimes thread-2 will precede thread-1.
Check correct option.
Keep Practicing Java and Brace for a New Java Coding Challenge!

Read More »