Results 1 to 2 of 2
  1. #1
    Rcub is offline Member
    Join Date
    Apr 2012
    Posts
    1
    Rep Power
    0

    Default Really new to java

    I need to know how to say "but" or "therefore" in java? Would you use an if statement? if so how?

    For example:

    If player one has choosen one
    therefore
    Then player two cannot choose one

    Again I am really new to java just trying to understand the basics

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,602
    Rep Power
    23

    Default Re: Really new to java

    I think the logic you are talking about is the same in java as many other similar languages.
    You use if statements to choose between different execution paths. You control the if statement by using boolean expressions.
    See the tutorals:
    Equality, Relational, and Conditional Operators (The Java™ Tutorials > Learning the Java Language > Language Basics)
    Control Flow Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)
    Expressions, Statements, and Blocks (The Java™ Tutorials > Learning the Java Language > Language Basics)
    If you don't understand my response, don't ignore it, ask a question.

Tags for this Thread

Posting Permissions

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