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
Be the first to start discuss.
Q. Which of these methods is used to know host of an URL?
Q. Which of the following is not an access modifier in Java?
Q. Which of these data type is returned by every method of OutputStream?
Q. ------------------- is an example of container class
Q. Which operator is used for exponentiation in Java?
Q. What will be the output of the following code –
Q. What will be the output of the following Java program?
Q. ____________ is a subinterface of java.rmi.Remote that defines the methods for the server object.
Discusssion
Login to discuss.