Examveda
Examveda

What will be the output of the following Java code?
enum Season 
{
    WINTER, SPRING, SUMMER, FALL
};
System.out.println(Season.WINTER.ordinal());

A. 0

B. 1

C. 2

D. 3

Answer: Option A


This Question Belongs to Java Program >> Data Types And Variables

Join The Discussion

Related Questions on Data Types and Variables