Search:

Type: Posts; User: Norm

Search: Search took 0.17 seconds.

  1. Thread: Ternary operator

    by Norm
    Replies
    8
    Views
    1,187

    Re: Ternary operator

    That must be javascript. function is not a keyword in java.
  2. Thread: Ternary operator

    by Norm
    Replies
    8
    Views
    1,187

    Re: Ternary operator

    I didn't try to compile the code to see if it had syntax errors. Does the posted code compile ok?
  3. Thread: Ternary operator

    by Norm
    Replies
    8
    Views
    1,187

    Re: Ternary operator

    Put what is before the ? into the if condition
    put what is between the ? and the : in the true part
    put what is after the : into the else part

    each section will return its value.
Results 1 to 3 of 3