Getting Started with Java
This is a 100% free course, but we need you to first join or login to watch this video.Alright, join or login here.
This video shows you how to use the ternary operator. The ternary operator is useful when you have to assign value to a variable on the basis of an if else statement. You can get rid of the if else statement and directly assign the value in one step.