Home / Programming MCQs / JAVA MCQs / Question
R
Q. What is the output of the Java code snippet?
int a=25, b=30; boolean c = a>25 & b<40; if(c) { System.out.println("RABBIT"); } else { System.out.println("GOOSE"); }
Since a is not greater than 25 so C will store false value. Else statement will be executed so GOOSE will be printed.
You must be Logged in to update hint/solution
Which exception is thrown by the read () method of Input Stream class?
In Java programming language, the code is placed inside ___.
Which of these coding types is used for data type char in Java?
Polymorphism is derived from a ___________ word.
How many finally blocks can there be in a try/catch structure?
What is the numerical range of a char data type in Java?
Choose the correct way of autoboxing Primitives to Wrapper objects below?
Discusssion
Login to discuss.