G
G Winstanley
Jus a quick one...now I've finally got hold of v1.5 I'm trying to use an
enum in a private final inner class, but I get the following message from
the compiler in NetBeans 4.0b2:
init:
deps-jar:
Compiling 1 source file to P:\NetBeans Projects\ProjectX\build\classes
P:\NetBeans Projects\ProjectX\src\Foo.java:7: modifier not allowed here
private enum Status{ONE, TWO, THREE, FOUR}
1 error
BUILD FAILED (total time: 0 seconds)
The class is defined as:
public class Foo
{
private final class Bar
{
private enum Status {ONE, TWO, THREE, FOUR}
// ...etc...
}
}
Any ideas which modifier it's got a problem with? I've tried removing the
private modifier and that has no effect. It seems that it's just not happy
having an enum within an inner class, but I can't find reference to this in
the enum documentation that comes with JDK1.5.
Stan
enum in a private final inner class, but I get the following message from
the compiler in NetBeans 4.0b2:
init:
deps-jar:
Compiling 1 source file to P:\NetBeans Projects\ProjectX\build\classes
P:\NetBeans Projects\ProjectX\src\Foo.java:7: modifier not allowed here
private enum Status{ONE, TWO, THREE, FOUR}
1 error
BUILD FAILED (total time: 0 seconds)
The class is defined as:
public class Foo
{
private final class Bar
{
private enum Status {ONE, TWO, THREE, FOUR}
// ...etc...
}
}
Any ideas which modifier it's got a problem with? I've tried removing the
private modifier and that has no effect. It seems that it's just not happy
having an enum within an inner class, but I can't find reference to this in
the enum documentation that comes with JDK1.5.
Stan