Skip to main content



      Home
Home » Newcomers » Newcomers » Else Error (Total newcomer)(Syntax error when trying to use else )
Else Error (Total newcomer) [message #1001149] Wed, 16 January 2013 01:17 Go to next message
Eclipse UserFriend
Hi friends,

I just started taking a intro to java programming course for my major programming requirement and I'm having trouble using "else" when I'm trying to make if statements.

Every time I type in "else" it gives me the error "Syntax error on token, "else," Delete this token"

I've been watching videos and I'm really trying to get a leg up on the class and really get an understanding of java and eclipse because I've always liked the idea of being able to program using java.

Any help would be greatly appreciated!
Re: Else Error (Total newcomer) [message #1001355 is a reply to message #1001149] Wed, 16 January 2013 09:48 Go to previous messageGo to next message
Eclipse UserFriend
On 1/16/2013 6:31 AM, Sean Wirth wrote:
> Hi friends,
> I just started taking a intro to java programming course for my major
> programming requirement and I'm having trouble using "else" when I'm
> trying to make if statements.
>
> Every time I type in "else" it gives me the error "Syntax error on
> token, "else," Delete this token"
>
> I've been watching videos and I'm really trying to get a leg up on the
> class and really get an understanding of java and eclipse because I've
> always liked the idea of being able to program using java.
>
> Any help would be greatly appreciated!

First, this is a Java not an Eclipse question. Java questions are better
referred to forums for that purpose, some include javaranch.com,
jguru.com and stackoverflow.com.

Second, it's pretty hard to play compiler for you when you don't submit
any code to look at.
Re: Else Error (Total newcomer) [message #1003613 is a reply to message #1001355] Mon, 21 January 2013 11:03 Go to previous messageGo to next message
Eclipse UserFriend
In article <kd6eno$kvs$2@xxxxxxxxe.org>, russ@xxxxxxxx
says...
>
> On 1/16/2013 6:31 AM, Sean Wirth wrote:
> > Hi friends,
> > I just started taking a intro to java programming course for my major
> > programming requirement and I'm having trouble using "else" when I'm
> > trying to make if statements.
> >
> > Every time I type in "else" it gives me the error "Syntax error on
> > token, "else," Delete this token"
> >
> > I've been watching videos and I'm really trying to get a leg up on the
> > class and really get an understanding of java and eclipse because I've
> > always liked the idea of being able to program using java.
> >
> > Any help would be greatly appreciated!
>
> First, this is a Java not an Eclipse question. Java questions are better
> referred to forums for that purpose, some include javaranch.com,
> jguru.com and stackoverflow.com.
>
> Second, it's pretty hard to play compiler for you when you don't submit
> any code to look at.

All that said, you're probably missing some curly braces.
Re: Else Error (Total newcomer) [message #1710748 is a reply to message #1001149] Thu, 08 October 2015 15:54 Go to previous message
Eclipse UserFriend
if (age>100);

That semicolon terminates the if statement, so the else doesn't go with anything. Remove the semicolon.
Previous Topic:Eclipse 4.5.1 Update Site?
Next Topic:Migrate toolbar trim contribution from rcp3.x to 4.x
Goto Forum:
  


Current Time: Sat Apr 19 15:12:22 EDT 2025

Powered by FUDForum. Page generated in 0.07063 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top