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 3 of 3

Thread: Simple question pls help beginner learning java

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

    Default Simple question pls help beginner learning java

    the ELSE is underlined in red why doesn't it work


    Untitled.jpg


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,537
    My Mood
    Grumpy
    Thanks
    0
    Thanked 166 Times in 157 Posts

    Default Re: Simple question pls help beginner learning java

    Post your code here using code tags. Do not expect people to follow links especially if they are to hard to read jpegs.

    Errors associated with else is usually because you have not formatted the if part properly making completely separate from the else.
    if(...)
        // line of code inside if (if statement terminates here)
        // line of code outside if
    else //not part of the if statement
    Improving the world one idiot at a time!

  3. #3
    Junior Member vasanthjayaraman's Avatar
    Join Date
    Jul 2013
    Location
    Chennai
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Simple question pls help beginner learning java

    if(condition)
    {
    ..................
    ..................
    }
    else //no need to put condition....if you want to put condition means then better you can choose " else if(condition)"
    {

    }

Similar Threads

  1. help me pls (beginner)
    By xsinx in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 21st, 2012, 03:21 AM
  2. Replies: 1
    Last Post: November 11th, 2011, 06:46 PM
  3. Replies: 1
    Last Post: May 3rd, 2011, 09:46 AM
  4. [SOLVED] Simple question from a beginner
    By jimmylee7706 in forum Java Theory & Questions
    Replies: 1
    Last Post: March 6th, 2011, 08:57 PM
  5. Beginner needs help with simple java assignment.
    By joachim89 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: January 6th, 2010, 06:53 PM