Advertisement

05.18.2008 at 05:45PM PDT, ID: 23412544
[x]
Attachment Details

Java: problem creating enum

Asked by arkhls in Sun Java System Web Server

Tags: Java, 1.5

How can I create a simple enum in Java including only one String attribute and  get() and set() method ?
something like this

public enum myenum {
private    String   text;
public String getTest() {
return this.text;
}
I'm getting  Error exception "Syntaxc error on token string ... please see the attachment
Thansk



}
Start Free Trial
Attachments:
 
Eclipse screenshot for the error message I'm getting
Eclipse screenshot for the  error message I'm getting
 
[+][-]05.19.2008 at 12:37AM PDT, ID: 21595749

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Sun Java System Web Server
Tags: Java, 1.5
Sign Up Now!
Solution Provided By: arturh
Participating Experts: 2
Solution Grade: B
 
 
[+][-]05.19.2008 at 01:43AM PDT, ID: 21596046

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628