Results 1 to 2 of 2
  1. #1
    mancsta is offline Member
    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0

    Default Newbie Question using the less than < operator

    Solved.
    Thanks.
    Last edited by mancsta; 12-02-2010 at 02:01 AM. Reason: Solved.

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    In English "foo is 5 less than bar" can mean two different things:

    foo == bar - 5

    or

    foo < bar - 5

    Either of these two work as expressions in Java. They are boolean expressions: that is they have the value "true" or "false". The 5 in "5 less than" is interpreted as subtraction ie as part of an arithmetic expression.

    Say if this doesn't make sense.
    Last edited by pbrockway2; 12-02-2010 at 12:31 AM.

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM
  2. Newbie question
    By MrNiceGuy in forum New To Java
    Replies: 8
    Last Post: 11-12-2010, 06:29 AM
  3. Newbie design question
    By PrinceSendai in forum JDBC
    Replies: 1
    Last Post: 08-17-2010, 07:42 AM
  4. question about the operator ++
    By dardar in forum New To Java
    Replies: 10
    Last Post: 08-16-2010, 03:39 PM
  5. newbie question
    By ronguilmet in forum New To Java
    Replies: 2
    Last Post: 11-16-2009, 03:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •