Results 1 to 6 of 6

Thread: errors

  1. #1
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Default errors

    hello

    this is my frist java program will u help me out in solving the errors

    thanks


    Impot java.io.*;
    class Newton_one
    {
    public static void main(String (args[])) throws IOException
    {
    int v,u,a,t;
    BufferReader b1=newBufferedReader(new InputStreamReader(System.in));
    System.out.print("enter values for u,a & t respectively");
    u=Integer.parseInt (b1.readline());
    a= Integer.parseInt (b1.readline());
    t= Integer.parseInt (b1.readline());
    v=u+a*t;
    System.out.print("speed is "+v);

    }
    }

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    What are the errors you get? What goes wrong?
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Default

    there were three errors Newton_one.java:16: `}` expected
    }
    ^
    3 errors please correct the code

  4. #4
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    Are you sure?
    What is Impot ?
    What is main(String (args[])) ?
    What is BufferReader?
    What is newBufferedReader?
    What is readline() ?
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by santosh chauhan View Post
    there were three errors Newton_one.java:16: `}` expected
    }
    Did you count your left and right curly brackets and parentheses? b.t.w. 'Impot' is not a keyword in Java.

    kind regards,

    Jos

    edit: darn PhHein beat me to it again ... ;-)

  6. #6
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Help with three errors -.-
    By Insomniac Riot in forum New To Java
    Replies: 5
    Last Post: 03-30-2010, 06:52 PM
  2. errors
    By ravikumar in forum Threads and Synchronization
    Replies: 3
    Last Post: 09-29-2009, 04:15 AM
  3. Errors,errors and errors
    By xpatiencex in forum New To Java
    Replies: 6
    Last Post: 04-25-2009, 04:43 AM
  4. Errors.
    By rocky in forum New To Java
    Replies: 4
    Last Post: 04-09-2009, 08:05 AM
  5. Replies: 3
    Last Post: 03-08-2009, 01:51 AM

Posting Permissions

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