Here is the enum
class A {
public A() {
}
public enum B{
XYZ
ABC
}
public enum c{
DCE
}
}
How should i call enum B and enum c in another class?
Here is the enum
class A {
public A() {
}
public enum B{
XYZ
ABC
}
public enum c{
DCE
}
}
How should i call enum B and enum c in another class?
1.Just use class B extends A so the class B can see all the Objects of class A If you dont know how extend works see this link
2.Also you can use import to import A class
if you work in eclipse you should refer and the package name of A
If you work in NetBeans something similar
If you don't work(you work on notepad..) just use import A
public class B extends A{
//The class B can see the Objects of class A if they are not **private**
}
What,why,and how enums work http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html