March 22nd, 2003, 02:38 AM
cannot resolve symbol n declared file
hey... i'm starting up on java n ran into a little problem
this is my code
n its coughing up this problem
ne help is appricated
thanks in advance
Last edited by KeiTaro; March 22nd, 2003 at 03:40 AM.
March 22nd, 2003, 11:41 AM
The first problem is exactly as it says. If you have a public class in a file, the files name MUST be the same as the public class. In your case, the file name must be "RectangleTest.java". Note this is case specific in java. "rectangletest.java" is not the same.
The second either is a by-product of the first error, or you do not have an import for the Rectangle class. The Rectangle class is contained in a package and the java compiler needs to know where to get it at. See if you hav a line at the top of the source like this:
If not, add it.
public class RectangleTest
public static void main(String args)
System.out.println(new Rectangle(5, 10, 20, 30));
I would suggest some basic java tutorials
Last edited by Nemi; March 22nd, 2003 at 11:43 AM.