Given the value of a variable, write a statement, without using if construct, which will produce the absolute value of the variable.
Single Choice
Views 9
Answer:
x = x < 0 ? -x : x ;
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.