# cannot find symbol

• 07-21-2013, 02:05 AM
HelpingIsCaring
cannot find symbol
my question is commented out in the code. as u can see, its not doing anything yet bc i just started, i just ran into this problem, but have no idea how to solve it. and remember HelpingIsCaring:)-:
Code:

```package Point; /**  *  * @author Jason  */ public class Point {     protected int x;     protected int y;         public Point(int x, int y) {         this.x = x;         this.y = y;     }    class Shape {     protected int x;     protected int y;   // int [][] arr = new int [x][y];         // public void Move(int x, int y){       // this.x = x;         //this.y = y;         class Line extends Shape {       Point a;       Point b;             public Point GetA(){           return a;       }             public void SetA(Point a){           this.a = a;       }               public Point GetB(){           return b;       }             public void SetB(Point b){           this.b = b;       }   }           class Circle extends Shape {       Point center;       double radius;               public Point GetCenter(){           return center;       }             public void SetCenter(Point center){           this.center = center;       }               public double GetRadius(){           return radius;       }             public void SetRadius(double radius){           this.radius = radius;       }   }       class Rectangle extends Shape {       Point a;       Point b;               public Point GetA(){           return a;       }             public void SetA(Point a){           this.a = a;       }               public Point GetB(){           return b;       }             public void SetB(Point b){           this.b = b;       }             public void Show(){           System.out.println("this is a rectangle");       }         }     }       public static void main(String[] args) {         // TODO code application logic here         Rectangle rectangle = new Rectangle();    //this part is wrong. it says cant find symbol in class Point. why???             } }```
• 07-21-2013, 02:24 AM
jim829
Re: cannot find symbol
Did you really intend to have those classes nested? You need to check your closing braces on your classes. And if you really want to use the names Point, Rectangle, and Shape, then understand that folks on this forum will think of the normal Java API classes of the same name rather than your classes. So if you solicit help, you must either include all the code or document that they are your classes. My recommendation would be to prefix My in from of them (e.g. MyPoint) to avoid confusion. Or just use the classes in the JDK.

Regards,
Jim
• 07-21-2013, 03:13 AM
HelpingIsCaring
Re: cannot find symbol
i added something else to the code and changed the brackets a little and it worked! thanks for the help. :8): ur very caring.