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"); }
Explanation:
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 block contains a block of program statements where an exception might occur?
Java programs are _________ independent.
Methods having same name and differ type signature are called _____methods.
Choose the right statement about Java Data types.
Which of the following is a type of polymorphism in Java Programming?
In Java every data type requires some bytes of memory, How many bytes void data type requires?
The method used to set Fonts is
Which Thread pool is used where container creates a thread pool to process the request?
Discusssion
Login to discuss.