Computer Science, asked by shrivastava082324, 1 year ago

• Rewrite the snippet using ternary operater:- If(a

Answers

Answered by cutesmile590
7

Answer:

String val;

if (a>0)

/>

{

val ="positive "

}

else

{

val ='zero';

}

Explanation:

Hope it's help u

Answered by Anonymous
0

Answer:

if (expression) {

number = 10;

}

else {

number = -10;

}

Here, expression is a boolean expression which evaluates to either true or false. If it evaluates to true, expressionTrue is evaluated and assigned to variable number. If it evaluates to False, expressionFalse is evaluated and assigned to variable number.

Similar questions