How do i import AWT?

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-03-12T03:32:01Z Indexed on 2010/03/12 3:37 UTC
Read the original article Hit count: 518

Filed under:
|
|

Im teaching myself java and the book i'm looking at just got around to explaining AWT.

here is my source code:

java.awt.*

class obj
{
    public static void main (String[]arg)
    {
        Point blank; 
        blank = new Point (3,4) ; 
        int x = blank.x ;
        System.out.prinln (x) ; 
    }
}

here is the error i get while trying to compile it:

obj.java:1: 'class' or 'interface' expected
java.awt.*
^
1 error

What did i do wrong? / whats going wrong here?

© Stack Overflow or respective owner

Related posts about java

Related posts about awt