Java Conditional Operator Tutorial #64
Вставка
- Опубліковано 1 чер 2024
- $1,000 OFF ANY Springboard Tech Bootcamps with my code ALEXLEE. See if you qualify for the JOB GUARANTEE! 👉 bit.ly/3HX970h
The conditional or ternary operator in java lets you make an if-else statement on one line!
There are 3 parts to the conditional (ternary) operator in Java. The first part results in true or false, the middle is the value if it's true and the last is the value if it's false!
I hope you enjoyed this Java conditional (ternary) operator java tutorial!
Full Java Tutorial For Beginners Playlist: • Full Java Course by Al...
Free Tips: bit.ly/3U6HXcb
Disclosure: Springboard link provided is linked to my affiliate account & supports the channel.
Alex Lee
If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h
Damn that one liner is powerful
Oh never realized to use it like that.. :D you are a great guide to me .. Thanks man ..
hey ace of info... you were here way before me :D so i would appreciate if you could answer my question... i really like how alex is explaining... so i choose to follow his playlist
and he did start all.. because he wanted to make sure there is a source that everybody can access to understand it... but now he advocates so much his course... so i am afraid that he maybe shift the important content to his website? is my hunge correct?
or are the upcoming topics still fully understandable to learn java?
i would like to buy his course but right now its a little though because of corona :D
@@bewatter3014 well If you are a beginner sometimes it may be little hard to understand him.. It totally depends on you..
But I can say from all the tutorials I have seen, (even from my own tutorial in my channel) his guide is better..
Man this guy is a blessing. Thank you for all the effort you put into these videos..
I was reading about these in a book and I wasn't understanding it at all! this makes so much more sense, thanks!
I haven't heared sbout these before. Thank you so much for the video!
thx notification bouta learn something now today now🔔🔔
Super clear, thank you so much! Very helpful.
Dude you're amazing I literally thought some song is also playing from other window and i went through every window to check where that song is coming from lol
Thank you! This is very helpful.
thanks for sharing knowledge
Java really has some cool tricks, but sometimes it's also really complicated haha. Great vid, keep going.
Dear bro,
You are explaining everything very well and I request you to do more java practicing projects as well as advance java concepts as Soon as you can...I'm waiting..!🤩😍
Thanks in advance....!
Nice TUTORIAL!
thanks that was very helpful
Thanks Alex, you're the best
WELL EXPLAINED MAN
This is really cool! It can make code more concise!
true
never used or knew this before !
Man you're awesome man 😍🙂😎😄
thanks buddy...respect from INDIA 🧡
love from the philippines
Awesome 🙌🏼
@Alex Lee,
what does that 'a.equals' called and why u used it?
Thanks for the good vedio!!!
Brilliant! 👏👏👏
hey alex can u explain some sorting algorithms :) waiting...!
hey alex whats the difference between the java course and your youtube tutorials?
You are the best
Love from INDIA
love from the philippines
Next video can u teach how to make a progress bar and make it load? Or maybe teach how to install window builder on eclipse. I already know how to get windows builder but many don’t.
this is a cool tutorial! i didnt even know that was a thing! Next episode, can you do a tutorial on GUI graphics and stuff? like, drawing lines and figures in a GUI?
U don’t know how to do that? It’s pretty easy: it’s pre programmed in the java swing librar
@@fuzedcable5612 i'd still appreciate a tutorial
@@CollidaCube make a class extends JLabel and override public void paintComponent(Graphics g). Add the label to frame and you can draw with the Graphics object
@@CollidaCube I have some GUI tutorials if you need help with that.
Let's go, finished the basics 1! time to move on to basics 2
"FartGenerator" ? :))))) great project :D
this can’t be used for a nested if statement, right?
it’s just for a single if else statement?
thank you
hello bro
Alexxxx could you make a video teaching us how to do a lineal from minor to major sort to a multidimensional array??
hello
thanks
Tnx so smoth as always can u do a simple calculator on java too i wanna get operator on numbers from keyboard not from button that i make in gui cant write the code for it tho ty again
Got an exam this morning, came over for some quick revision
👀😂
"String method" a.equals
Is this always used instead of == when using String variables???
*** first week learning from scratch any advice appreciated
yes we use .equals when we compare 2 strings, on the other hand, we use == operator when we are comparing integers
is there a way to nest these or use them with elif?(else if) :D
Nice
alex how many languages can u code on?
Im looking for job as automation tester !! Any suggestion ?
Yey new vid
You should do JavaFX GUI instead of Swing.
Can you make a polymorphism video?
Sure :)
Cool, how often is the ternary operator used?
it depends on you, its a replacement of If...else
it is case sensitive?
Thank you! I was watching a course on udemy and got stuck!
Is this also know as a ternary operator?
Can we use println statements with ternary operator?
yes
*yes*
We had that in school
could you please tell us how did learned java ??
keep on programming
Why not use if? Or when to use if statement and conditional statement
Is it possible you make a game in java with graphics and please can you create a tutorial on it!
Thanks
yes like 2D games
yo men your cool😉😉
Can I know the song name of the intro?
Make a Java employee payroll system guide!
Hi!!!
hello
Is this possible with boolean? 🤔
yes
Teach us how to make a circle!!
Can you make a game with JFrame?
For people: It's also called ternary operator.
The music in the background while you're talking was distracting for me in the beginning, but fortunately it stopped soon.
System.out.println("Alex lee is the best java learning teacher for easy concepts")
double subs = 188.000; // thousand
double leftSubs = 12.000; //thousand
public static void makeHimTwoHundredThousand (double subs, double leftSubs){
double twohundredThousand = subs + leftSubs;
if ( double twohundredThousand < 200.000){
System.out.println("keep on making those videos Alex ! ");
} else {
System.out.println("YESSSSSS ALEX LEE REACHED 200 THOUSANDD");
}
}
public static void main ( String[] args){
makeHimTwoHundredThousand();
}
I know how to code programs like tic tac toe, rock paper scissors and some basic programs, what should i learn next ?
if you like making games try to make a simple 2d game.
I got a text from my crush, but this came up on my notifications.
You know what I chose.
lolz
haha
Hellloo Alex
u so handsome i dont know where to look 😮💨