Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to define to enumeration type in Java 1.4?

Status
Not open for further replies.

mabsito

Newbie level 3
Joined
Feb 22, 2005
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,304
Enumeration Type in Java

Hello,
can some one help and tell how to define a Type enumeration in Java 1.4 like this
enum color (blue,red);

Thanks
 

Re: Enumeration Type in Java

Try using interface.Like

public interface color{

public int blue=0;
public int green=1;
//etc
}

After that just implement the interface
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top