The below program has an enum class with Student which has marks of different students. Define a constructor and get the marks of each student in the following way. Total Marks: Radha got 90 marks.
The valueOf() method can be used to obtain an instance of the enum class for a given String value. Here is an example.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results