Computer Applications

Rewrite the following using ternary operator.

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

Java Operators

163 Likes

Answer

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

Answered By

100 Likes


Related Questions