Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble comparing integers  RSS feed

 
Michael Scalzetti
Greenhorn
Posts: 20
Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there I'm kinda new to coding with java but I get the just of it. I'm confused on why this code doesn't work( it doesn't show any errors on luna eclipse). Instead of typing out one or the other it types out both no matter what I try, maybe im just getting tunnel vision HELP!
>
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37234
519
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

There should not be a semi-colon here. Having it there means "execute this empty statement that ends in a semi-colin if the statement is true.
 
Michael Scalzetti
Greenhorn
Posts: 20
Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:
There should not be a semi-colon here. Having it there means "execute this empty statement that ends in a semi-colin if the statement is true.

Thanks that fixed my problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!