Home / Programming MCQs / JAVA MCQs / Question
R
Q. What is the output of the below Java program with Enums?
enum Bus { DIESEL, ELECTRIC, HYBRID int mileage = 10; } public class EnumTest2 { public static void main(String[] args) { Bus bus = Bus.ELECTRIC; System.out.println(bus + ", " + bus.mileage); } }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
What is the abbreviation of ASCII?
The condition of a Java Ternary operator should evaluate to ___.
Which data type has this Minimum and Maximum value from 3.4e-038 to 3.4e+038?
Integers are whole values ________ numbers.
Consider the following code snippet. The code is equivalent to which code?
What is the error in this code? byte b = 50; b = b * 50;
Which of the following below live on the heap in java?
Which of the following automatic type conversion will be possible?
What do you mean by chained exceptions in Java?
Which of the following is not a built-in functional interface in Java 8?
Discusssion
Login to discuss.