Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Where is the error?

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Where is the error?

    Where r the errors?

    public class Q3_StudentID {
    public static void main(String[] args) {
    int x, y, my Num = 0;
    double d = 10 + x; x = 3;
    y = d + 2;
    if (! x>5)
    System.out.println('Result1 = ' + x);
    Else
    System.out.printIn("Result1 = " + y);
    System.out.println("Result2 = %d" + myNum);
    System.out.println("Result3 = " + x / myNum); myNum++;
    System.out.printf("Result4 = %.0f\n" + d);
    } // end main method
    } // end Class Q3_StudentID


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,097
    Thanks
    48
    Thanked 2,153 Times in 2,126 Posts

    Default Re: Where is the error?

    Do you have the JDK installed with the javac compiler?
    If you do, use the javac program to compile your code and it will give you the compiler errors.
    If you have questions about the error messages, copy the full text of the error messages and paste it here.

    Please edit your post and wrap your code with code tags:
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Where is the error?

    I am a very beginner. Tell me how to compile a very simple code of Java??

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,097
    Thanks
    48
    Thanked 2,153 Times in 2,126 Posts

    Default Re: Where is the error?

    Do you have the JDK installed?

    The tutorial shows how to compile a program with the javac command:
    "Hello World!" for Microsoft Windows (The Java™ Tutorials > Getting Started > The "Hello World!" Application)
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Please! Help me to this error "ERROR CANNOT FIND SYMBOL"
    By mharck in forum Object Oriented Programming
    Replies: 8
    Last Post: July 3rd, 2012, 09:20 AM