public class Point {
...
}
class Line{
Point location;
...
}
So what does this location variable with type Point
, exactly do? It doesn't give me an error so I know it's correct, but what is the purpose of it. When I do that, is it the same as doing:
Point location = new Point();
Or no? Can I access methods using my location variable I created? Why or why not?