Howdy, Stranger!

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


Ternary Operator In Java

ginualexginualex kottayamPosts: 109Member

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



  • manishamanisha Posts: 32Member
    edited June 2015

    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:

Sign In or Register to comment.