View Single Post
  #3 (permalink)  
Old 06-10-2007, 05:30 PM
theFOX ®
Posts: n/a
It seems you are using the default package. When using the default package, or whenever the class that you want to use is in the same package as the other class, then you shouldn't import it.

Hence, simply remove the import MyClass; statement.

BTW, in java world, the use of the default package is discouraged. It will cause some troubles; for example, if you want to use some classes located at the default package from another class inside another package, you won't be able to import those classes from the default package.

Enjoy!


EDIT

I forgot to tell you that the reason of the error by the compiler, is that it expected an inner class. For example, if the MyClass has an inner class or something, then you will have to write import MyClass.MyInnerClass; Another reason could be from the fact that you cannot import default package classes, the complier thought MyClass to be a package.

Thanks.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote