D
Q. What is the output of the following code?
int x = 10; if (x < 5) { System.out.println(“x is less than 5”); } else if (x > 20) { System.out.println(“x is greater than 20”); } else { System.out.println(“x is between 5 and 20”); }
Since x is between 5 and 20, the else block is executed and “x is between 5 and 20” is
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. What is the compiler error for improperly using Underscores ( _ ) in literals in Java?
Q. What is the range of values that can be stored in a char variable in Java?
Q. In Java, can a "finally" block be used without a "catch" block?
Q. Java source files are compiled and converted to
Q. In Java, you can pass __ variables from one constructor to another overloaded constructor.
Q. Method used to take a string as input in Java?
Q. Which of the following is the correct syntax for a for loop in Java?
Q. What is the output of the following code?
Q. What makes the Java platform independent?
Q. Which escape character is used for word character in regex?
Discusssion
Login to discuss.