Computer Applications

Rewrite the following using ternary operator.

if(income<=100000)
tax = 0;
else
tax = (0.1*income);

Java Operators

139 Likes

Answer

tax = income <= 100000 ? 0 : (0.1*income);

Answered By

82 Likes


Related Questions