In Java, Ternary Operator is the only operator which operates on three operands. In this video, we will look into the syntax of the ternary operator and then, we will create an example to calculate the difference between two numbers.
 
We will also see how the operator is useful to always get the difference as a positive number.
 

Ternary Operator Explained With Example

5y
6.1k
500
  • 8
Sivaraman Dhamodaran is a Software Engineer. He has over 15 years of experience in IT Industries. He had come across Vc++ & MFC Frame Work, Dot.Net technologies, Oracle and SQL Server. He mostly worked on Desktop database applications, GSM Compatible Modems, Biometric devices, and Graphics technologies.