filmov
tv
Java Tutorials- Java Operators (Conditional Operator)
![preview_player](https://i.ytimg.com/vi/hL4ALqyNtws/maxresdefault.jpg)
Показать описание
Java Dukes--
In this video you will learn about the conditional operator that is used in Java.In java there is only a single conditional operator i.e. ternary operator (?:) used.This operator is known as ternary operator because it takes three arguments. the general syntax of ternary operator is
exp1?exp2:exp3
Here exp1 is a Boolean expression which will return either a true value or a false value as result.If on evaluation of exp1 the result is true then exp2 is returned as output and if on evaluating exp1 the result comes false then exp2 is returned as output.
Java Dukes--
In this video you will learn about the conditional operator that is used in Java.In java there is only a single conditional operator i.e. ternary operator (?:) used.This operator is known as ternary operator because it takes three arguments. the general syntax of ternary operator is
exp1?exp2:exp3
Here exp1 is a Boolean expression which will return either a true value or a false value as result.If on evaluation of exp1 the result is true then exp2 is returned as output and if on evaluating exp1 the result comes false then exp2 is returned as output.
Java Dukes--