• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Trouble comparing integers

 
Greenhorn
Posts: 20
Java Ubuntu Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
>
 
author & internet detective
Posts: 41415
854
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic