Ternary Opeartor in Java Programming - Video Tutorials For Beginners

preview_player
Показать описание
In this beginners video tutorial you will learn about the ternary operator / shorthand operator in java programming language with example.

You will learn what is a ternary operator, what is the use of it, how to use them, what is the syntax of it, where we can use it with example in detail.

Get the source code of this tutorial at our website

Watch Video tutorials in HINDI at

Catch us on SocialMedia
Рекомендации по теме
Комментарии
Автор

Thank u so muchhhh Sr... For such easiest examination....

lonehumi
Автор

This made me feel proud of myself. I took the information i have learned so far from this youtube series and made a mini program that takes in the value of two user inputs and then displays the highest number to the screen:

package LearningJava;

import java.util.Scanner;

public class Programming {

public static void main(String[] args) {

Scanner firstinput = new Scanner(System.in);
Scanner secondinput = new Scanner(System.in);

int num1, num2;
int max;

System.out.println("Please enter first number");
num1 = firstinput.nextInt();
System.out.println("Please enter second number");
num2 = secondinput.nextInt();

max = num1 > num2 ? num1 : num2;

System.out.println("The highest number is ");
System.out.println(max);

firstinput.close();
secondinput.close();
}

}

TheRazza
Автор

I am really proud to learn by you....

RonakRawatBusiness
Автор

thanku sir but we need more topics about java

naseebuddin
Автор

thanku sir ...u made it very easy to undersand

srisaiprakashiragavarapu
Автор

That's cool. Easily explained! Thanks man.

asif_mojtoba
Автор

As always my friend Great work.. I learned C++ from you and now continue to java for more prouctive endeavors. A+ Professor

bekim
Автор

But commenting in java is done by // right? Or by /*
?

nashraali
Автор

"And then niggas can check that using..."
I'm dying here. hahahahaehaha. 0:52 & 3:40
Anyways... hahaha... thanks.

johnbritolima
Автор

x>5 ? System.out.println(x) : System.out.println(x+ "is less than 5");

It is giving me error at x>5 showing invalid assignment operator

aayushgupta
visit shbcf.ru