New to java and have a question related to packages.
I like to keep objects organized in namespaces and ran into a problem with enums that I cannot figure out.
Say I have a nested enum like this:
package Project;
public class Foo
{
public enum Bar { One, Two, Three };
}
I want to do something like this
package Project.Attributes;
public class Foo
{
public setBar( Project.Foo.Bar bar ) {}
}
But I am getting name conflicts and unknown package ‘Foo’ errors.
How can I achieve this?
It should work after below corrections
One more suggestion is to use small case for package names.