Java switch ⬇【4 minutes】

  Рет қаралды 121,275

Bro Code

Bro Code

Күн бұрын

Пікірлер: 191
@BroCodez
@BroCodez 4 жыл бұрын
public class Main { public static void main(String[] args) { // switch = statement that allows a variable to be tested for equality against a list of values String day = "Friday"; switch(day) { case "Sunday": System.out.println("It is Sunday!"); break; case "Monday": System.out.println("It is Monday!"); break; case "Tuesday": System.out.println("It is Tuesday!"); break; case "Wednesday": System.out.println("It is Wednesday!"); break; case "Thursday": System.out.println("It is Thursday!"); break; case "Friday": System.out.println("It is Friday!"); break; case "Saturday": System.out.println("It is Saturday!"); break; default: System.out.println("That is not a day!"); } } }
@_Anna_Nass_
@_Anna_Nass_ 3 жыл бұрын
Thank you for always taking the time to put the code in the comments.
@trickysachin
@trickysachin 2 жыл бұрын
@@_Anna_Nass_ he can easily copy and paste lol
@trickysachin
@trickysachin 2 жыл бұрын
@@_Anna_Nass_ because he is smart and helpful
@bartekjaniec3056
@bartekjaniec3056 Жыл бұрын
You can write "->" instead of ":" and you don't need now writing break at the end switch(day) { case "Sunday" -> System.out.println("It is Sunday!"); case "Monday" -> System.out.println("It is Monday!"); or switch(day) { case "Sunday" -> { System.out.println("It is Sunday!") System.out.println("It's a free day!") }; case "Monday" -> { System.out.println("It is Monday!") System.out.println("It's not a free day!") }; } if you need to run more than 1 command.
@vaibhavside5886
@vaibhavside5886 Жыл бұрын
Sout enter and only bro code
@Chndnsharma28
@Chndnsharma28 4 жыл бұрын
System.out.println("Awesome explanation!") ;
@oxi1492
@oxi1492 Жыл бұрын
No main method found in program
@Sqrt.Infinity
@Sqrt.Infinity 10 ай бұрын
public class Human { public static void main(String args[]) { System.out.println("Awesome Explanation!" ); } }
@deiti
@deiti 5 ай бұрын
@@Sqrt.Infinity incorrect indentation
@mpathfinder
@mpathfinder 3 жыл бұрын
Learning the beginnings of Java in school but the tricks in these tutorials are awesome like: sysout + strg/ctrl + space
@coltonbailey8873
@coltonbailey8873 3 жыл бұрын
You teaches the peaches, for real. Thank you so much for taking the time to create these lessons. You've designed them in such a order, that while I'm learning I can take a new concept that you're teaching me, and apply it with one of your previous lessons easily. Right now I'm creating switch statements while interfacing a GUI. I wish you would have squeezed a video about using getText() though, because Scanner can't be used with JOptionPane apparently x). Thank you for teaching me stuff and things, Proffeser Bro.
@VENKATADHANUNJAYAREDDYK
@VENKATADHANUNJAYAREDDYK 10 ай бұрын
(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠๑⁠˙⁠❥⁠˙⁠๑⁠(⁠ʃ⁠ƪ⁠^⁠3⁠^⁠)(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠๑⁠˙⁠❥⁠˙⁠๑⁠)(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠๑⁠˙⁠❥⁠˙⁠๑⁠)(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。(⁠◍⁠•⁠ᴗ⁠•⁠◍⁠)⁠✧⁠*⁠。
@Actionkidfam
@Actionkidfam Жыл бұрын
An exciting and brief course by bro absolutely amazing may your channel grow big Af
@epic1343
@epic1343 4 жыл бұрын
your tutorials are always amazing thanks bro
@KarolKasperek
@KarolKasperek Жыл бұрын
quick reminder. Now you can use lambda expression: switch(number) { 1 -> do something; 2 -> do something; 3 -> do something } instead of switch(number) { case 1: do something; break; case 2: do something; break; case 3: do something break; }
@doggo2821
@doggo2821 3 ай бұрын
what will be the default and break for this expression
@Fadhelalmalki
@Fadhelalmalki Ай бұрын
It is not Lambda expression it is called (Lambda-like syntax) .. Lambda is the replication for the anonymous inner class ..but may be we can name as enhanced switch
@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
@alexanderperez3974
@alexanderperez3974 Сағат бұрын
Best channel ever!
@sleepypanda8249
@sleepypanda8249 2 жыл бұрын
im going to like all your videos. you are saving me. thx bro !!!
@VikasAshok-n4v
@VikasAshok-n4v Ай бұрын
best switch case explanation
@giancarlonassi8268
@giancarlonassi8268 Жыл бұрын
I always come back to this channel to learn anything
@meeh0
@meeh0 2 жыл бұрын
Thank you so much. Well explained
@chikondiphelzmapelera5794
@chikondiphelzmapelera5794 Жыл бұрын
This is really lit bruh🔥🔥
@ItsAkiresuSama
@ItsAkiresuSama 8 ай бұрын
Teachers seeing this and making it 2 hours long:
@ngenogilbert4061
@ngenogilbert4061 4 жыл бұрын
Well explained!
@ghoggaliabdou4222
@ghoggaliabdou4222 3 жыл бұрын
Thank you again 💙💙
@mishabalakirsky243
@mishabalakirsky243 26 күн бұрын
Thanks, bro
@Nikkhil492
@Nikkhil492 3 жыл бұрын
you like pizza bro...good thing
@kacpermikulski6012
@kacpermikulski6012 3 ай бұрын
Ty bro
@elboulifihoussam4769
@elboulifihoussam4769 2 жыл бұрын
Well explained!
@salahadinshemsu6186
@salahadinshemsu6186 Жыл бұрын
Thanks bro
@uuijs1
@uuijs1 8 ай бұрын
bro, thank you for everything, you helped me pass my ict subject and make coding fun!
@Gogito503
@Gogito503 Ай бұрын
Super!
@tanjirodluffy4403
@tanjirodluffy4403 8 ай бұрын
Thank you bro
@Jack-mr6ty
@Jack-mr6ty 3 ай бұрын
So can you add 3 together like Sunday , Monday and Tuesday Instead of putting too many break ;
@crunchyyomari
@crunchyyomari 9 ай бұрын
Chad
@StandProudYouAreStrong
@StandProudYouAreStrong Жыл бұрын
Love ur videos bro :>
@lorezoldik
@lorezoldik 3 жыл бұрын
Maaaan you got 170 likes and 0 dislikes this is the proof that you are really really really good i think even a monkey would understand java with your lessons you are too good at explaining it
@Woltex444
@Woltex444 Жыл бұрын
lol fr
@CartoonTv-zf2qr
@CartoonTv-zf2qr 2 жыл бұрын
Yeah I become a hero !!
@711mobiles
@711mobiles 3 жыл бұрын
Switching case the next lesson, default is learning
@dwayladallas3375
@dwayladallas3375 5 күн бұрын
Thank you for your efficiency!
@leechurchill1965
@leechurchill1965 11 ай бұрын
If I become president, I will make pizza the 8th day of the week.
@gamesandsoftwares1441
@gamesandsoftwares1441 2 жыл бұрын
doing my part for the algorithm
@natethegreat632
@natethegreat632 2 жыл бұрын
Thanks, bro. Algorithm comment
@simik4830
@simik4830 Ай бұрын
comment for algorithm
@YashwantKoppoju
@YashwantKoppoju 2 ай бұрын
Thanks man very much appreciate it
@martinsvanda5874
@martinsvanda5874 Жыл бұрын
nice
@rexelcier8768
@rexelcier8768 2 жыл бұрын
System.out.println("you gave one of the best explanation , thank you bro ");
@oximas-oe9vf
@oximas-oe9vf 2 жыл бұрын
i wonder if python has a similar way for handling multiple conditions
@uneducatedguy369
@uneducatedguy369 7 ай бұрын
Can we apply switch case to integer also ?
@samrusselcanillo127
@samrusselcanillo127 Жыл бұрын
Thanks Bro code ❤
@roboticskarawang6132
@roboticskarawang6132 Жыл бұрын
i though you need to give number for each case
@techaddict5660
@techaddict5660 3 жыл бұрын
Really love your videos.I need to support you!!!!
@mohamedelfadli3125
@mohamedelfadli3125 Жыл бұрын
I like your teaching style. hhhh
@techshrish6300
@techshrish6300 Ай бұрын
W EXPLANATION 💥
@kapebreak
@kapebreak Жыл бұрын
my comment bro thank you bro
@eldoonsnoodles
@eldoonsnoodles 5 ай бұрын
send this to yandere dev
@mlgcactus1035
@mlgcactus1035 5 ай бұрын
pro gunga moment here
@danielmilewski7659
@danielmilewski7659 2 жыл бұрын
comment for stats. thanks!
@jpm1127
@jpm1127 Жыл бұрын
Thank you bro code!
@ramakrishnatallapragada7569
@ramakrishnatallapragada7569 2 жыл бұрын
Thanku Bro🙏🙏🙏🙏
@jarza4
@jarza4 Жыл бұрын
lets make pizza a day again
@bartomiejsniadach5795
@bartomiejsniadach5795 2 жыл бұрын
Here is a comment for you
@shivali9283
@shivali9283 18 күн бұрын
I'm a hero
@MindBodyStorm
@MindBodyStorm 2 ай бұрын
🍕 Pizza day‼️
@Giovanni-Rhonim
@Giovanni-Rhonim 8 ай бұрын
God Bless you Bro +7
@soumelee5661
@soumelee5661 Жыл бұрын
pizza is not a day indeed
@solitude_963
@solitude_963 5 ай бұрын
thankyou Bro
@AARTIKUMARI-fe8wx
@AARTIKUMARI-fe8wx Жыл бұрын
vedio-10
@Suraj-rv2dt
@Suraj-rv2dt Жыл бұрын
❤❤❤❤❤ great 🎉🎉🎉🎉
@grozageorge2887
@grozageorge2887 Жыл бұрын
For the default statement you should have said "That is not a day, but it should be :))."
@amanbts-g4z
@amanbts-g4z Жыл бұрын
thank you brother you saved my day🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰😍😍😍😍😌😌😌😌
@abadiabadi3205
@abadiabadi3205 2 ай бұрын
A legend
@anyarasan8529
@anyarasan8529 10 ай бұрын
you are a hero bro
@gloriouslover100
@gloriouslover100 8 ай бұрын
good video bro!
@wallstreetbets7741
@wallstreetbets7741 2 жыл бұрын
thx learnt
@MoguMogu818
@MoguMogu818 Жыл бұрын
THANK YOU homie. My ass had no idea what this was in class today. Saved my ass 30 minutes to rewatching lecture videos lol. I think my professor sucks.
@yeliza2350
@yeliza2350 2 жыл бұрын
4 february done
@yeliza2350
@yeliza2350 2 жыл бұрын
4 february done
@PromiscuousMonkey
@PromiscuousMonkey 10 күн бұрын
.
@hadihiwa5690
@hadihiwa5690 8 ай бұрын
Thanx bro
@trickysachin
@trickysachin 2 жыл бұрын
😄
@zobama
@zobama 9 ай бұрын
real bro
@abadiabadi3205
@abadiabadi3205 2 ай бұрын
System.out.print("thank u man ");
@Ibraghim
@Ibraghim Жыл бұрын
Ily so much
@furkanveliisk4113
@furkanveliisk4113 2 жыл бұрын
thanks brah
@sannyuntaung6322
@sannyuntaung6322 Жыл бұрын
Thanks for your explanation Bro ! May I know why it shows default whenever I type Monday with small letter m. how can i solve to show correctly without caring Monday or monday
@azamato
@azamato 2 жыл бұрын
good to know
@PoorwayTraning
@PoorwayTraning Жыл бұрын
thanks
@mafakka2
@mafakka2 Жыл бұрын
it's all good but why eclipse? u don't sound THAT old
@aditipatil3807
@aditipatil3807 Жыл бұрын
Thanks
@javierpesaresi311
@javierpesaresi311 Жыл бұрын
Like it
@Abdulaziz-bj5rg
@Abdulaziz-bj5rg 2 жыл бұрын
legend
@MrLoser-ks2xn
@MrLoser-ks2xn 2 жыл бұрын
Thanks
@yato_lol
@yato_lol Жыл бұрын
ok
@tamirrozenfeld3572
@tamirrozenfeld3572 2 жыл бұрын
THank!
@maciejkaminski8535
@maciejkaminski8535 3 жыл бұрын
comment
@NebyuDaniel-j6b
@NebyuDaniel-j6b Ай бұрын
😊😊😊
@MISA-qy4hx
@MISA-qy4hx Жыл бұрын
One more thing you can do instead of having to change the day string value is to ask the user to input the day using scanner. However, my question here is how to implement equalsIgnoreCase here? import java.util.Scanner; public class Main { public static void main(String[] args) { // switch = statement that allows a variable to be tested for equality against a list of values Scanner scanner = new Scanner(System.in); String day = scanner.nextLine(); switch(day) { case "Sunday": System.out.println("It is Sunday!"); break; case "Monday": System.out.println("It is Monday!"); break; case "Tuesday": System.out.println("It is Tuesday!"); break; case "Wednesday": System.out.println("It is Wednesday!"); break; case "Thursday": System.out.println("It is Thursday!"); break; case "Friday": System.out.println("It is Friday!"); break; case "Saturday": System.out.println("It is Saturday!"); break; default: System.out.println("That is not a day!"); } } }
@avikmaybe
@avikmaybe 3 ай бұрын
yo
@williamtowne2079
@williamtowne2079 2 жыл бұрын
thx
@Horatius_23
@Horatius_23 2 жыл бұрын
:D
@yosurekusi
@yosurekusi 2 жыл бұрын
a
@straightguy8384
@straightguy8384 2 жыл бұрын
I don't know what i have to comment, just wanna comment to support this channel tho
@victortruong1524
@victortruong1524 Жыл бұрын
BRO code !!! You are the chosen one, to be the None Indian KZbin Teacher :))
@bekturasanbekov1979
@bekturasanbekov1979 Жыл бұрын
thx 4 vid bro
@marknebadon8709
@marknebadon8709 Жыл бұрын
I’ve been learning Java programming on my end for almost 1 month now, and all of the theoretical concepts and logic understanding is only on top of my head, I’ve got a MacBook, so I’m wondering if you have a recommendation about a program for coding to start with, I’d appreciate it since I tried but they did not work properly (
@trebiscott1931
@trebiscott1931 8 ай бұрын
Tomorrow i've got a Java exam in school, and this helped a lot. Thanks
@cesara9747
@cesara9747 2 жыл бұрын
doing well!
Java logical operators ❗ (AND OR NOT)
8:00
Bro Code
Рет қаралды 74 М.
Java methods 📞
11:05
Bro Code
Рет қаралды 136 М.
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
路飞与唐舞桐
Рет қаралды 10 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 35 МЛН
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,7 МЛН
you will never ask about pointers again after watching this video
8:03
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 86 М.
Variables in Java ✘【12 minutes】
12:32
Bro Code
Рет қаралды 206 М.
Java objects (OOP) ☕
10:46
Bro Code
Рет қаралды 177 М.
why do void* pointers even exist?
8:17
Low Level
Рет қаралды 367 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 233 М.
Java if statements 🚧【6 minutes】
6:12
Bro Code
Рет қаралды 154 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Последствия выхода Айфона 16
0:23
ТРЕНДИ ШОРТС
Рет қаралды 4,1 МЛН
3x 2x 1x 0.5x 0.3x... #iphone
0:10
Aksel Alze
Рет қаралды 2,7 МЛН