Ternary Operator In Java - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Ternary Operator In Java

ginualexginualex kottayamPosts: 109Member

YouTube video available for Ternary Operator In Java
YouTube link address::::::::

Tagged:

Comments

  • manishamanisha Posts: 32Member
    edited June 29

    Very Nice Video. :smile:

    Ternary Operator (? : )
    Ternary operator is used to check if the condition is true then the part after (?) is executed else part after (:) is executed.

    Example: To find the greater no from two.

    int a=10,b=5;
    int c=(a>b)? a : b;

    We can say it is shorthand of "if else" conditional statement.

    For more Details Refer following link:

    http://java.meritcampus.com/t/48/Ternary-operator?tc=mm228

Sign In or Register to comment.