When i try to compile this:
import java.awt.* ;
class obj
{
public static void printPoint (Point p)
{
System.out.println ("(" + p.x + ", " + p.y + ")");
}
public static void main (String[]arg)
{
Point blank = new Point (3,4) ;
System.out.println (printPoint (blank)) ;
}
}
i get this error:
obj.java:12: 'void' type not allowed here
System.out.println (printPoint (blank)) ;
^
1 error
I don't really know how to start asking about this other than to ask:
- What went wrong here?
- What does this error message mean?