enum inside a class
class Ordinary
{
public enum Dir{North,South,East}
}
class Sp
{
public static void main(String arg[])
{
Ordinary.Dir d=Ordinary.Dir.North;
System.out.println(d); //North
}
}
Sun certification level tutorial and examples Organized by topic.
class Ordinary
{
public enum Dir{North,South,East}
}
class Sp
{
public static void main(String arg[])
{
Ordinary.Dir d=Ordinary.Dir.North;
System.out.println(d); //North
}
}
Thank you for visiting Java Examples.For regular updates request you to subscribe to my RSS Feed or register your Email Subscription for updates directly into your mail box.
0 comments:
Post a Comment