Results 1 to 2 of 2
  1. #1
    dubs4sam is offline Member
    Join Date
    Oct 2013
    Posts
    1
    Rep Power
    0

    Default error: class, interface, or enum expected First=keyboard.readint("")

    class student{
    public static void main (String[]args);}


    System.out.printint("Enter first number");
    First=keyboard.readint("")

    System.out.printint("enter second number")

    Second=keyboard.readint("")

    result=first/second

    System.out.printint("The result is ")

    System.out.printint("The result")

    }//end of class
    }//end of method



    error codes are
    : error: class, interface, or enum expected
    System.out.printint("Enter first number");
    ^
    error: class, interface, or enum expected
    First=keyboard.readint("")
    ^
    2 errors

    Tool completed with exit code 1
    would appreciate some help

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,923
    Rep Power
    5

    Default Re: error: class, interface, or enum expected First=keyboard.readint("")

    Please read the forum rules and also place your code between [code][/code] tags.

    Take a look at your static main method. The semi-colon and closing } are inappropriately placed.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Replies: 3
    Last Post: 01-20-2013, 09:06 PM
  2. Replies: 4
    Last Post: 12-08-2012, 11:56 AM
  3. Replies: 1
    Last Post: 10-03-2012, 10:38 PM
  4. Replies: 2
    Last Post: 10-02-2010, 03:13 AM
  5. Replies: 3
    Last Post: 12-05-2008, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •