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
Q. How to copy contents of array?
Q. Which attribute is used to specify class name of the bean?
Q. Which of the following is intrinsic data type
Q. Java is designed for _______ environment of the internet.
Q. Which attribute uniquely identification element?
Q. Which of the following is not a valid identifier for a Java variable?
Discusssion
Login to discuss.