Created
March 1, 2016 18:00
-
-
Save arn-ob/075406d9a38b4624f97a to your computer and use it in GitHub Desktop.
Enum Example in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class frut { | |
enum frt{ Small , Medium , Large } | |
frt size; | |
} | |
public class tst { | |
public static void main(String[] args){ | |
frut sz = new frut(); | |
sz.size = frut.frt.Small; | |
System.out.println("Size : "+ sz.size); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment