I'm having an issue trying to get my import to work. I'm a novice as a java developer.
The files are in the same directory, but if I type in this it doesn't work.
It says it can't find the myPackage. Can someone help?
I'm not sure how to get it to know where the myPackage is.
I am not sure what is applet thread here about :confused:
Any package import means that package is on your main class level or lower.
Just create package (folder) next to your main source file and add a *.java file to it...
If you use an IDE you should read its documentation to find out how to create a new package in the frames of your project.
The import statement is a way to add paths for the compiler to find class definitions.
If the referenced classes are in the same directory as the source, then you shouldn't need an import statement. Unless the classes are in packages, in which case the class files will have to be in folder/paths that match the package name.
Could you give an example? Eg the filename, packages, classes referenced