Hi ALl,
I have an interface and it has innerclass and i want to make use of
this innerclass in some other method in a different file.
how to use it
EX
public interface WRK extends Ser
{
public enum T{ A(1)
,W(7)
,M(30)
,Y(365);
private final int nD;
T(int d)
{
this.nD = d;
}
public int d()
{
return this.nD;
}
};
}
Here i want to make use of enum. how to do it.
Regards
Vipin R.S
Tymoteusz Gedliczka - 22 Mar 2007 12:36 GMT
> Hi ALl,
> I have an interface and it has innerclass and i want to make use of
> this innerclass in some other method in a different file.
> how to use it
refer to the enum this way: WRK.T
then you use:
WRK.T testEnum = WRK.T.W;
etc.
Lew - 23 Mar 2007 13:25 GMT
> Hi ALl,
> I have an interface and it has innerclass and i want to make use of
> this innerclass in some other method in a different file.
You are showing us a nested class, not an inner class.
<http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3>
> how to use it
> EX
> public interface WRK extends Ser
The Java source convention is that only the first letter of each word part is
capitalized except for well-extablished abbreviations like URL, CIA.
> {
> public enum T{ A(1)
[quoted text clipped - 17 lines]
>
> Here i want to make use of enum. how to do it.