Instantiate enum class

后端 未结 9 1518
南笙
南笙 2020-12-03 05:34

Consider I am having the following enum class,

public enum Sample {
    READ,
    WRITE
}

and in the following class I am trying to test th

9条回答
  •  渐次进展
    2020-12-03 06:03

    Fetch a good book on Java Basics and read it.

    Anyways, Enums in java are classes with fixed number of objects and objects are defined by its attributes.

    Again, you can read something about it here

提交回复
热议问题