Java Question on using your own class
well we came up with a simple class, and we where trying to use it, but when trying to import
Code:
import wintersclass; Code:
public static void main(String[] args) throws IOException |
You only need to import a class if it's defined in a different package (i.e. subdirectory) than the class you are using. Javac will automatically search for classes in the class path when trying to resolve symbol names.
Try removing the Code:
import wintersclass; |
Hi
Just a tip, but when you instantiate your object: Code:
wintersclass testName; Code:
wintersclass testName = new wintersclass(); |
All times are GMT -5. The time now is 06:57 AM. |