Java if statements 🚧【6 minutes】

  Рет қаралды 154,695

Bro Code

Bro Code

Күн бұрын

Пікірлер: 181
@BroCodez
@BroCodez 4 жыл бұрын
public class Main { public static void main(String[] args) { // if statement = performs a block of code if it's condition evaluates to be true int age = 75; if(age==75) { System.out.println("Ok Boomer!"); } else if(age>=18) { System.out.println("You are an adult!"); } else if(age>=13) { System.out.println("You are a teenager!"); } else { System.out.println("You are not an adult!"); } } }
@jamesangeles8954
@jamesangeles8954 11 ай бұрын
😮
@davidbolduc4378
@davidbolduc4378 3 жыл бұрын
I wish Bro Code was my professor
@nikolanovakovic4150
@nikolanovakovic4150 2 жыл бұрын
well he kinnda is haha
@amoszadoff9863
@amoszadoff9863 2 жыл бұрын
True
@Ryzen4070TM
@Ryzen4070TM 8 ай бұрын
i mean your not wrong!@@nikolanovakovic4150
@rohitbharatbhandwalkar8583
@rohitbharatbhandwalkar8583 Жыл бұрын
I can't wait to get to the more complicated stuff and witness how Bro Code makes it a cake walk
@tankgirlsc
@tankgirlsc Жыл бұрын
You have explained things so much better than my coding instructor! There has never been an explanation as to "why" such operations are used, and how they can be used incorrectly, take for example the one equal sign as an assigned vs the two equal signs to compare. Now I know why my code spat out a bunch of errors. You just got yourself a subscriber sir!
@mr.phewphew4971
@mr.phewphew4971 7 ай бұрын
Oh my god you are wasting money on that proof
@trodg
@trodg 2 жыл бұрын
my prof struggled to explain this to us today and you did it in 6 minutes in such a clear way
@Ryzen4070TM
@Ryzen4070TM 8 ай бұрын
how 💀 but yeah i agree
@shift-g3l
@shift-g3l 2 ай бұрын
whuh
@codedawg05
@codedawg05 2 ай бұрын
how is that possible?💀
@laduckly8917
@laduckly8917 Жыл бұрын
I made a coin flip code: import java.util.Random; public class Main { public static void main(String[] args) { Random random = new Random(); int x = random.nextInt(2)+1; if(x==1){ System.out.println("Heads"); } else { System.out.println("Tails"); } } }
@marioshusband3700
@marioshusband3700 4 жыл бұрын
finally, after all these episodes, you make an if statement tutorial
@BroCodez
@BroCodez 4 жыл бұрын
haha it's a remake tho
@3lbalk
@3lbalk 3 жыл бұрын
@@BroCodez what is the illegal character 200f or something like that
@antwoinesmith4650
@antwoinesmith4650 Жыл бұрын
Your explanations are so good, thanks. I'm new to coding and when I need a quick refresher on something I know where to come to.
@pavelkvasnicka6856
@pavelkvasnicka6856 Жыл бұрын
This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro
@josephthecreator
@josephthecreator 2 жыл бұрын
This video gave me the missing piece to complete my assignment, thanks Bro! 💯
@sairos4057
@sairos4057 2 жыл бұрын
Scanner method: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scannerr = new Scanner(System.in); System.out.print("What's your age?"); int age = scannerr.nextInt(); if (age >= 70) { System.out.println("You're an elder! It would be cool if you choose not to drive"); } else if (age >= 18){ System.out.println("You can drive little boy"); } else { System.out.println("You can't drive until you reach the reach the age 18 y/o"); } // ~~~~scanner end~~~~ scannerr.close(); } }
@Carlo775
@Carlo775 Жыл бұрын
Thank you so much bro I love you, if i could kiss you right now i would.
@hamse46z
@hamse46z 10 ай бұрын
Thanks! I was Struggling how to take number from user!
@carljohnson779
@carljohnson779 Жыл бұрын
why is it saying "C:\Users\ok\OneDrive\Documents\main.java:1: error: class Main is public, should be declared in a file named Main.java public class Main { ^ 1 error Tool completed with exit code 1"
@pranayborode
@pranayborode 3 жыл бұрын
import java.util.Scanner; public class main { public static void main(String[] args) { int age; Scanner scanner = new Scanner(System.in); System.out.println("Enter your age :"); age= scanner.nextInt(); if(age>=18) { System.out.println("You are an adult!"); } else { System.out.println("You are not an adult1"); } } }
@sairos4057
@sairos4057 2 жыл бұрын
Don't forge to close the Scanner, bro. scanner.close(); or Scanner.close(); I don't remember lol
@justsomeordinarykid923
@justsomeordinarykid923 2 жыл бұрын
Coming from knowing java script I now know they both have java in the name. Even for loops work the same.
@RahmatullahVahdatWithCod-pl2vh
@RahmatullahVahdatWithCod-pl2vh 2 ай бұрын
Thank you brother thank you if you need money allah give U A Billuner .!!!
@medapatinityasrisantoshred2894
@medapatinityasrisantoshred2894 3 жыл бұрын
bros for life and thanks for the playlist
@alandrewcarillo9498
@alandrewcarillo9498 Жыл бұрын
Smashed subscribed button Bro!! liked your way of teaching and accent. :)
@JuliHoffman
@JuliHoffman 2 жыл бұрын
We learned if and else if statements in my Java Bootcamp, but this explained them much better. Thanks!
@muhammadmushfiqurrahman1653
@muhammadmushfiqurrahman1653 2 жыл бұрын
Thanks for your tutorial.
@erickayusi9449
@erickayusi9449 4 жыл бұрын
I noticed you deleted the char and string topic in the playlist?
@eddyfromduolingo3587
@eddyfromduolingo3587 9 ай бұрын
what a chad🗿
@sairos4057
@sairos4057 2 жыл бұрын
GUI method: import javax.swing.JOptionPane; public class Main{ public static void main(String[] args) { int age = Integer.parseInt(JOptionPane.showInputDialog("What's your age?")); if (age >= 18) { JOptionPane.showMessageDialog(null, "You can drive!"); } else { JOptionPane.showMessageDialog(null, "You can't drive!"); } } }
@mojeebullahazami2676
@mojeebullahazami2676 3 жыл бұрын
Random comment :)
@HexaBinary-i5
@HexaBinary-i5 18 күн бұрын
Your voice sounds exactly like Technoblade! : )
@ghoggaliabdou4222
@ghoggaliabdou4222 3 жыл бұрын
Thank you again 💙💙
@kidochamp
@kidochamp Жыл бұрын
a comment, catch!
@Curious_Clover
@Curious_Clover 7 ай бұрын
"Ok Boomer!" I was caught off guard there buddy. I almost laughed in the middle of the night.
@jayanthbonugu6679
@jayanthbonugu6679 Жыл бұрын
Great video
@cesara9747
@cesara9747 2 жыл бұрын
amazing job, bro!
@simik4830
@simik4830 Ай бұрын
comment for the algortihmm
@camdenburns7181
@camdenburns7181 Жыл бұрын
what if you have multiple if statements
@dynamic2114
@dynamic2114 3 жыл бұрын
lmao, ok boomer
@FFax.annime
@FFax.annime Ай бұрын
@BroCodez is it wrong to write The value before the variable in the if statement for example If( 20>iage)
@danny.3036
@danny.3036 3 жыл бұрын
You are real bro, thanks for the helpful video again ;)
@CalZ_23
@CalZ_23 8 ай бұрын
dropping a comment down below
@sumiyaakter2041
@sumiyaakter2041 3 жыл бұрын
I like your video
@ibrahimylmaz8378
@ibrahimylmaz8378 2 жыл бұрын
you are amazing!
@CrStylrZ
@CrStylrZ 3 ай бұрын
I have a class test in exactly 20 minutes. And bro actually saved my life. Thank you i owe my life to you
@JerseyzFinest201
@JerseyzFinest201 5 ай бұрын
Professor Bro Code to the rescue
@dogowo
@dogowo 2 жыл бұрын
your jokes are funny
@DixeyDo
@DixeyDo 15 күн бұрын
Thank you!
@Garrison86
@Garrison86 2 жыл бұрын
Amazing! Thanks Bro
@CyberEscuela
@CyberEscuela Ай бұрын
Awesome Sauce!
@danielmilewski7659
@danielmilewski7659 2 жыл бұрын
comment for stats. thanks.
@manuj90
@manuj90 3 жыл бұрын
"ok boomer" I explode jajajajaja
@williamdrum9899
@williamdrum9899 Жыл бұрын
Programmer: "int age;" Me, a intergalactic eldritch monstrosity who just turned 2,147,483,648 years old: 😢
@Giovanni-Rhonim
@Giovanni-Rhonim 8 ай бұрын
God Bless you Bro + 6
@skipanimations9837
@skipanimations9837 2 ай бұрын
Thanks Bro
@ljaykhan520
@ljaykhan520 8 ай бұрын
Great tutorial bro
@Minecarthus
@Minecarthus 3 жыл бұрын
Good video !!!!
@shantanukulkarni2413
@shantanukulkarni2413 3 ай бұрын
Love you bro!
@AARTIKUMARI-fe8wx
@AARTIKUMARI-fe8wx Жыл бұрын
vedio - 9
@Gametimewithsurya
@Gametimewithsurya 2 ай бұрын
bro is bro
@Gogito503
@Gogito503 Ай бұрын
Nice
@thefabffgamer3245
@thefabffgamer3245 4 ай бұрын
hey bro!
@spadeace981
@spadeace981 Жыл бұрын
for me the code dosnt work, it just repeat the number i input and dosnt even ask me the question Syntax Error: invalid syntax file "" line 1 ^ how do i fix this?
@bekturasanbekov1979
@bekturasanbekov1979 Жыл бұрын
thx 4 vid bro
@ganyu5768
@ganyu5768 3 ай бұрын
all your videos are really great Brev. really cool :0 it helps me to learn java again with interest.
@harshpachouri9150
@harshpachouri9150 Жыл бұрын
random comment
@JoshuaWhitie
@JoshuaWhitie 4 ай бұрын
Bro
@matinmonshizadeh
@matinmonshizadeh 3 жыл бұрын
Thank you bro
@yeliza2350
@yeliza2350 2 жыл бұрын
4 february end
@zobama
@zobama 9 ай бұрын
real bro
@appatheqt3713
@appatheqt3713 Жыл бұрын
I love you
@StandProudYouAreStrong
@StandProudYouAreStrong Жыл бұрын
I love u bro
@salahadinshemsu6186
@salahadinshemsu6186 Жыл бұрын
Thanks bro
@Simis999
@Simis999 2 жыл бұрын
Ok millennial
@LoBroune
@LoBroune 6 ай бұрын
How come I havent seen you before. Thanks a lot man! you help me greatly.!
@mambojambo4717
@mambojambo4717 4 ай бұрын
Thank you Chad
@terrathefifth
@terrathefifth Жыл бұрын
Comment 9
@turdascelis1801
@turdascelis1801 Жыл бұрын
ok boomer!
@melissaruth1000
@melissaruth1000 8 ай бұрын
your videos are so so good. thanks for your help
@grey_ROBOT
@grey_ROBOT 10 ай бұрын
cool
@PoorwayTraning
@PoorwayTraning Жыл бұрын
thanks
@曾毓哲-b1t
@曾毓哲-b1t Жыл бұрын
Thanks
@wallstreetbets7741
@wallstreetbets7741 2 жыл бұрын
thx! learnt
@wallstreetbets7741
@wallstreetbets7741 2 жыл бұрын
rewqatch
@wallstreetbets7741
@wallstreetbets7741 2 жыл бұрын
Rewatch
@AmanNgmOP
@AmanNgmOP Жыл бұрын
One question: If your age is 19, You are a teenager or an adult?
@chiyaminecraft
@chiyaminecraft 5 ай бұрын
Adult
@beom8285
@beom8285 Жыл бұрын
The best!!
@williamtowne2079
@williamtowne2079 2 жыл бұрын
thanks
@MrLoser-ks2xn
@MrLoser-ks2xn 2 жыл бұрын
Thanks
@maciejkaminski8535
@maciejkaminski8535 3 жыл бұрын
comment
@mamaafrica2512
@mamaafrica2512 2 жыл бұрын
c
@ghoggaliabdou4222
@ghoggaliabdou4222 3 жыл бұрын
Thank you brother for all of your work.
@MACVXACE
@MACVXACE 9 ай бұрын
KAKASHI AFTER RETIREMENT AS HOKAGE 🚶🏻🧙 LOL BRO KEEP IT UP .
@jarza4
@jarza4 Жыл бұрын
yessa
@oratilwe4462
@oratilwe4462 2 ай бұрын
❤❤❤❤❤
@robertdraxel7175
@robertdraxel7175 3 жыл бұрын
dropping a comment for the youtube algorhitm
@Seltz_
@Seltz_ 4 ай бұрын
YAAAAAAAAAAAAAAA
@amalalmuarik5160
@amalalmuarik5160 3 жыл бұрын
in 3:13 why it didn't print the bode of if and the body of else if is it because of the curly braces ?
@navnitkaklotar
@navnitkaklotar 2 ай бұрын
🤯👀
@technicalresi5451
@technicalresi5451 7 ай бұрын
Thank you so much bro very nice 😊❤
@javierpesaresi311
@javierpesaresi311 Жыл бұрын
Like your didactics
@gurey4013
@gurey4013 Жыл бұрын
Hello! What website/app are you using for coding?
@honoredegg
@honoredegg 2 жыл бұрын
So, else statement. I've done with Scanner, learned from you. 9th. Thank you, ma Bro Sensei!
@SAEID-n4r
@SAEID-n4r Жыл бұрын
❤❤❤
@ewawojciech-bu3be
@ewawojciech-bu3be 5 ай бұрын
Thank you for this !
@Vijay_Isaac
@Vijay_Isaac Жыл бұрын
❤‍🔥
@stefan5450
@stefan5450 3 жыл бұрын
I f I watch this video, I will learn how to deal with if. If not, than not. :)
@mayssaad5242
@mayssaad5242 4 ай бұрын
hvvjv
@EdyMatyy
@EdyMatyy 2 жыл бұрын
Java switch ⬇【4 minutes】
4:45
Bro Code
Рет қаралды 121 М.
Офицер, я всё объясню
01:00
История одного вокалиста
Рет қаралды 5 МЛН
Minecraft Creeper Family is back! #minecraft #funny #memes
00:26
Variables in Java ✘【12 minutes】
12:32
Bro Code
Рет қаралды 206 М.
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
The if-elif-else Statement in Python
12:45
Neso Academy
Рет қаралды 33 М.
How I Would Learn Python FAST in 2024 (if I could start over)
12:19
Thu Vu data analytics
Рет қаралды 368 М.
Learn Java in 14 Minutes (seriously)
14:00
Alex Lee
Рет қаралды 4,8 МЛН