Write an expression using the conditional operator (? :) that compares the value of the variable x to 5 and results in: x if x is greater than or equal to 5 -x if x is less than 5

LANGUAGE: JAVA

CHALLENGE:

Write an expression using the conditional operator (? 🙂 that compares the value of the variable x to 5 and results in: x if x is greater than or equal to 5 -x if x is less than 5

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,