Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

enum in JDK 1.5.07

807599Jan 8 2007 — edited Jan 8 2007
Hi everyone,

I am new to Java 5, and I am try to recompile the code below in learning the enum, but I got some compiling error such as around the enum. It said that "Syntac error on token "enum" ....

If you have worked through this problem, could you please let me know what is wrong from my code, thanks for your help!

Dung.

--------------------------

package chapter3;

public class EnumTest {

public static void main(String[] argv) {

if ( argv.length < 1 ) {
System.out.println("Usage: java EnumTest [num char]");
System.exit(1);
}

else {
NUM_INFO ni = Enum.valueOf(
NUM_INFO.class, argv[0].toUpperCase());
System.out.println(
"Char : " + ni.getNumChar() + "\n" +
"Value: " + ni.getNumValue()
);
System.out.println("Name of the Num Info : " + ni.name());
}
}
}

enum NUM_INFO {
ONE ('1', 1.0/6.0),
TWO ('2', -2.0/6.0),
THREE ('3', 3.0/6.0),
FOUR ('4', -4.0/6.0),
FIVE ('5', 5.0/6.0),
SIX ('6', -6.0/6.0);

private final char numChar;
private final double numValue;

NUM_INFO(char numChar, double numValue) {

this.numChar = numChar;
this.numValue = numValue;
}
public char getNumChar() {

return this.numChar;
}
public double getNumValue() {

return this.numValue;
}
}

Comments

unknown-7404

I have scheduled a job to run a batch file which exports a schema , every day in 3 P.M. ,

when i created it , i did not specify a start date or end date , and i chose " Daily " as a FREQ , and did not check any days .

Ok

1. What is your question or issue?

2. What does you question or issue have to do with Sql Developer?

Unless this is a Sql Developer question please mark it ANSWERED and repost it in the General DB forum

When you repost provide the code you used to create the job. And because your start_date uses an unusual format also post the NLS settings you are using.

If the job hasn't run at all it could be that the start_date you provided is either in the past or far into the future.

JuanM

As others mentioned, mark this question "as assumed answered"

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 5 2007
Added on Jan 8 2007
1 comment
222 views