InnerClass Help

V

Vipin

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
 
T

Tymoteusz Gedliczka

Vipin said:
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.
 
L

Lew

Vipin said:
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.
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top