Search:

Type: Posts; User: Norm

Search: Search took 0.20 seconds.

  1. Replies
    9
    Views
    2,044

    Re: Help writing the IF statement for Y/N

    Please Edit your post and wrap your code with
    <YOUR CODE HERE> to get highlighting


    Are you trying to reference a field in String or call the method with that name? Method references end with...
  2. Replies
    9
    Views
    2,044

    Re: Help writing the IF statement for Y/N

    For examples try Google or do a Search here.
  3. Replies
    9
    Views
    2,044

    Re: Help writing the IF statement for Y/N

    To test if a String variable: str content's is "Y" use: str.equals("Y")
    To test if a char variable: aChar content's is 'N' use: aChar == 'N'

    Use an if statement to conditionally execute some...
  4. Replies
    9
    Views
    2,044

    Re: Help writing the IF statement for Y/N

    The String class has methods to see if two Strings are equal while ignoring the Strings' case. Look at the API doc for the String class.
    Java Platform SE 6
Results 1 to 4 of 4