5.3 How to use Ternary Operator in Java Tutorial

  Рет қаралды 176,323

Telusko

Telusko

Күн бұрын

Пікірлер: 69
@rslechu
@rslechu 5 жыл бұрын
low volume.. difficult to understand what you speak. :(
@Smruti.909.-
@Smruti.909.- 5 жыл бұрын
Good One ,all your explanation is from basic.
@salmanabbas8296
@salmanabbas8296 6 жыл бұрын
sir i have a doubt, what condition have you taken to be true in if(true) condition plz explain
@skrehman
@skrehman 3 жыл бұрын
Assuming the code in if block is true...to print code in if block we hv to code if(true)
@k3tara178
@k3tara178 4 жыл бұрын
Dude this saved my comp Class test, thanks bhai
@happyVibesOnly1618
@happyVibesOnly1618 8 жыл бұрын
sir please show some theoretical explanation of the different concepts that are explained practically.
@arunrajak.b8987
@arunrajak.b8987 3 жыл бұрын
awesome unknown fact, thank you so much navin sir
@SmartProgramming
@SmartProgramming 6 жыл бұрын
nice one sir, thanks for this sir 🙂
@ravidhanwal9226
@ravidhanwal9226 3 жыл бұрын
nice explanation sir...
@nandishpatel1654
@nandishpatel1654 4 жыл бұрын
sir can you explain in detail about this ternary operator. I really don't understand the last example.
@NikhilRaj-bh7wc
@NikhilRaj-bh7wc 6 жыл бұрын
On compiling, I'm getting this message: F:\Begins\JAVA\IntelliJ\ControlStatementsAndArrays>javac IfElseVSTernOp.java Note: IfElseVSTernOp.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. What is "-Xlint" ?
@AkashSingh-yp8rt
@AkashSingh-yp8rt 5 жыл бұрын
i used float instead of double then too it showed 10.0 as output.....Why? dont they take same space.
@saidivyalakshmireddy4648
@saidivyalakshmireddy4648 8 жыл бұрын
sir ... the functioning of the ternary operatior is same as in dz above example for c programming too..... I jst wanna know..... plzzzz rply me sir
@vladanulardzic5859
@vladanulardzic5859 4 жыл бұрын
Hi, very nice explanation! Easy to understand! Can you make video regarding chained ternary operator - little more complex? Thank you. Keep on.
@37_komalpatil16
@37_komalpatil16 4 жыл бұрын
Great sir.. thank you
@VoracitySensei
@VoracitySensei 4 жыл бұрын
really helpfull i really need that
@nithyashreenaidu8357
@nithyashreenaidu8357 4 жыл бұрын
what is that new,object,integer sir
@sanjaych5501
@sanjaych5501 8 жыл бұрын
sir, upto now u have not explained about object and u area suddenly using object
@screwedidiot937
@screwedidiot937 8 жыл бұрын
Object Itself Is A Class. All The Other Classes are SubClass Of Object Class.
@sid792
@sid792 6 жыл бұрын
Is it necessary to write package com.navin ; in this coding
@thiagarajanselvaraj9044
@thiagarajanselvaraj9044 5 жыл бұрын
Sir, in this video ,sound is not audible. And this problem is occuring in some of the other videos also.Kindly do the needful
@avinod4301
@avinod4301 7 жыл бұрын
can u explain what if it's multiple expression instead of single(?) "var='(exp1)?(exp2):(exp3)".
@poojaprogrammer4666
@poojaprogrammer4666 3 жыл бұрын
We can use if else statement only if there are 2 conditions and same is applicable for ternary
@avinod4301
@avinod4301 3 жыл бұрын
@@poojaprogrammer4666 can you add some quick snippets for helping me understand better
@dpanjobs8210
@dpanjobs8210 8 жыл бұрын
Could u able to run using user input and execute the condition acording to the user input
@screwedidiot937
@screwedidiot937 8 жыл бұрын
Use These Statements Of Code Scanner reader = new Scanner(System.in); // Reading from System.in System.out.println("Enter a number for i: "); int i = reader.nextInt(); // Scans the next token of the input as an int.
@k3tara178
@k3tara178 4 жыл бұрын
use scanner for that
@MdAzad-hb7vc
@MdAzad-hb7vc 5 жыл бұрын
Great tutorial, clearly explained!
@fathiyaadel9409
@fathiyaadel9409 7 жыл бұрын
amazing video
@monsaa6607
@monsaa6607 3 жыл бұрын
Thnx
@antarasaha3905
@antarasaha3905 5 жыл бұрын
Why don't you improve the sound quality? sometimes it feels like you are shouting and the next moment nothing is audible.
@________________8872
@________________8872 7 жыл бұрын
Currently using your videos to read code and figure out ways to create plugins for a custom programmed MC server I wanna make. Your videos are clear, short, and easy to understand. +1 like for each video and +1 sub for you. :)
@asimshahzad4998
@asimshahzad4998 7 жыл бұрын
and if value in the right is smaller then what ??? e.g . true?new Integer(10):new Double(5.0); in my case it also gives 10.0 although 5.0 is smaller than 10 but it is selecting the data type of minimume number i.e 5.0
@UncoveringTechnologies
@UncoveringTechnologies 6 жыл бұрын
true?new Integer(10):new Double(5.0); The above statement's condition is not depended on the size of data. But, it is depended on the statement which is written on the left of *question* *mark* (?). Because it is written "true" in the condition statement, that's why it always produces 10 as output.
@siddharthamyakala8961
@siddharthamyakala8961 3 жыл бұрын
See the memory occupied by the data type, not the value assigned. Double occupies 8bytes whereas integer occupies 4bytes
@chalapathinagavarmabhupath8432
@chalapathinagavarmabhupath8432 4 жыл бұрын
what is the object in this video? Is it is an inbuilt class or derived datatype and what is the use of it. Can anyone help me
@ashishmeshram110
@ashishmeshram110 7 жыл бұрын
class MyClass { public static void main(String args[]) { { int x = 5; if (x < 1); System.out.println("Hello"); } } } in the program above the output is Hello. I don't understand why?
@manishjain7021
@manishjain7021 7 жыл бұрын
remove ; after if statement's condition...then only the next statement will be executed when condition evaluates to true.
@waqasshabbir1843
@waqasshabbir1843 6 жыл бұрын
Your condition if(x
@pronobsaha1796
@pronobsaha1796 4 жыл бұрын
Great sir🙏🙏
@jvsainikhil9305
@jvsainikhil9305 2 жыл бұрын
reason behind keeping new,why cant we write directly
@btechtechie3238
@btechtechie3238 4 жыл бұрын
But what is the condition there. It is difficult to understand
@pritishdeshpande4532
@pritishdeshpande4532 8 жыл бұрын
what is the difference in between "int" and "Integer"??
@screwedidiot937
@screwedidiot937 8 жыл бұрын
In Java, the 'int' type is a primitive , whereas the 'Integer' type is an object.
@shreyasingh3508
@shreyasingh3508 4 жыл бұрын
@@devendra5290 yes
@onlinejobnepal5932
@onlinejobnepal5932 8 жыл бұрын
I did not understand why obj1 becomes true and obj2 becomes false. please reply..
@akhilsuresh9536
@akhilsuresh9536 8 жыл бұрын
Its not like that. While using if , obj1 gets integer value 10. obj2 is also true. So the first stmt is executed which means obj2 also gets new Integer(10). But its the property if ternary operator that it examines the datatype of both the cnditions. Whichever datatype is large, The right statemnt will get executed changing its current datatype to bigger datatype.
@neeharikapatel4460
@neeharikapatel4460 5 жыл бұрын
What is 'object' in this video??? Is it data type??
@kadiyalasaisowmith8739
@kadiyalasaisowmith8739 3 жыл бұрын
yeah...its a non-primitive data type like strings
@aidandanielski
@aidandanielski 7 жыл бұрын
Favoring Double over Integer is stupid.
@sjagnani
@sjagnani 9 жыл бұрын
You didnt tell what an object data type is?
@pratikbhardwaj3804
@pratikbhardwaj3804 7 жыл бұрын
Object is parent of all classes
@dimpalbhatia5037
@dimpalbhatia5037 7 жыл бұрын
sir what is object keyword ???
@sourabhkumarsingh9648
@sourabhkumarsingh9648 7 жыл бұрын
sir speak loudly
@HARSHKUMAR-fi5fr
@HARSHKUMAR-fi5fr 6 жыл бұрын
volume is not good !!
@namasreerama6618
@namasreerama6618 4 жыл бұрын
Sir voice is slow so speak highly
@shrutisharma7634
@shrutisharma7634 7 жыл бұрын
Volume is too low.
@HP160498
@HP160498 6 жыл бұрын
Turn it up bitch
@kaustubh.sharma
@kaustubh.sharma 6 жыл бұрын
HP160498 xD
@pavanmudhole2065
@pavanmudhole2065 3 жыл бұрын
2:40 Im not understding wt you doing
@mohamedthoufiqm8108
@mohamedthoufiqm8108 Жыл бұрын
❤️
@aryangpg
@aryangpg 5 жыл бұрын
low volume sir!!!
@evin7671
@evin7671 4 жыл бұрын
Thoda awaaz lao mooh me
@AustinCS
@AustinCS 6 жыл бұрын
You sound like you're eating a bowl of soup
@rameshgaming1020
@rameshgaming1020 7 жыл бұрын
hey be clear.you are not audible properly.
@ajaypratapsingh5400
@ajaypratapsingh5400 4 жыл бұрын
Toda tez bola krna
@vivekkandhagatla8684
@vivekkandhagatla8684 7 жыл бұрын
poor voice clarity
@tanishqtripathi5228
@tanishqtripathi5228 4 жыл бұрын
not good tutorials teaching without giving prior knowledge about the things used in programming . first explain what is object then teach about object..................................'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
5.4 Java Trick | Print Hello World without using Semicolon
2:44
HOW WALKING AWAY CAN BE YOUR GREATEST POWER...
25:26
Stoic Mind
Рет қаралды 577 М.
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 48 МЛН
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 69 МЛН
5.10 Loop pattern Logic in Java Tutorial
11:08
Telusko
Рет қаралды 171 М.
Java Programming Tutorial 22 - Ternary Conditional Operator
5:09
Map and HashMap in Java - Full Tutorial
10:10
Coding with John
Рет қаралды 587 М.
Return Statement in Java #27
14:38
Alex Lee
Рет қаралды 279 М.
Multithreading in Java Explained in 10 Minutes
10:01
Coding with John
Рет қаралды 940 М.
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 48 МЛН