Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using enums inside packages.

 
S Vashisht
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've the following directory structure

EnumTest
|
-- Test.java
-- MyEnum.java


Test.java contains :-

package EnumTest;

public class Test{
MyEnum e;
}

MyEnum.java contains

package EnumTest;
public enum MyEnum {FIRST,SECOND}

When I try to compile Test.java, it can't find symbol MyEnum. However if I
remove package statement from both source files this code works. How can I
compile the code with package statment ?



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Heart Br", please check your private messages for an important administrative matter.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic