Switch Case in Java
Full Java Course: https://course.alexlorenlee.com/courses/learn-java-fast
If you're new to programming, I HIGHLY RECOMMEND solving challenges on Edabit: https://edabit.com/?ref=alexlee
I recommend installing Tabnine autocomplete on your IDE (free and saves you time):
https://www.tabnine.com/get?lang=java&utm_source=youtube.com&utm_medium=Ins&utm_campaign=AlexLee
Disclosure: Edabit and Tabnine links provided are linked to my affiliate accounts & support the channel.
This is how you can use switch case statements in your java programs! ✅Hopefully, what I've taught you will help you with these tricky switch statements.
👑Start practicing now with 10 free java programs - http://alexlorenlee.com/
🌅Source Code - https://github.com/alexlorenlee/JavaTutorialCode/blob/master/Conditionals/SwitchCase.java
If you have if/else if statements comparing one variable over and over, a switch case statement may be easier for you. The layout for a java switch case statement looks like this:
switch(num) {
case 1:
//do this
break;
case 2:
//do this
break;
default:
//do this
}
Switch cases can be better in many situations, but if your code works with if else statements instead, I wouldn't worry about it too much.
This switch statement in java can be tricky at first... But SURELY you'll get it :) If you followed along, congrats! You learned-by-doing!
I hope you enjoyed this tutorial on how to use switch case in java! I like to have a nice mix of java tutorials and actual projects for you all :)
Do you want to learn how to write java code from scratch, in Java? Check out my Java Tutorial For Beginners: https://youtu.be/woJb2hAfkO0
Was this able to get your switch case statement working? -
Free tips and programs: http://alexlorenlee.com
Programmer Humor: https://www.xonot.com - Promo code: "ALEX10" for 10% off
Recommended Channels to Subscribe to
Career Karma: https://youtube.com/channel/UCkCwv67-...
TheNewBoston: https://youtube.com/user/thenewboston
~
https://discord.com/invite/Yk3uqST
https://instagram.com/alexlorenlee
https://youtube.com/channel/UCLkeDGcXfiKlN2imazwkg4A (2nd channel)
Alex Lee
Видео Switch Case in Java канала Alex Lee
If you're new to programming, I HIGHLY RECOMMEND solving challenges on Edabit: https://edabit.com/?ref=alexlee
I recommend installing Tabnine autocomplete on your IDE (free and saves you time):
https://www.tabnine.com/get?lang=java&utm_source=youtube.com&utm_medium=Ins&utm_campaign=AlexLee
Disclosure: Edabit and Tabnine links provided are linked to my affiliate accounts & support the channel.
This is how you can use switch case statements in your java programs! ✅Hopefully, what I've taught you will help you with these tricky switch statements.
👑Start practicing now with 10 free java programs - http://alexlorenlee.com/
🌅Source Code - https://github.com/alexlorenlee/JavaTutorialCode/blob/master/Conditionals/SwitchCase.java
If you have if/else if statements comparing one variable over and over, a switch case statement may be easier for you. The layout for a java switch case statement looks like this:
switch(num) {
case 1:
//do this
break;
case 2:
//do this
break;
default:
//do this
}
Switch cases can be better in many situations, but if your code works with if else statements instead, I wouldn't worry about it too much.
This switch statement in java can be tricky at first... But SURELY you'll get it :) If you followed along, congrats! You learned-by-doing!
I hope you enjoyed this tutorial on how to use switch case in java! I like to have a nice mix of java tutorials and actual projects for you all :)
Do you want to learn how to write java code from scratch, in Java? Check out my Java Tutorial For Beginners: https://youtu.be/woJb2hAfkO0
Was this able to get your switch case statement working? -
Free tips and programs: http://alexlorenlee.com
Programmer Humor: https://www.xonot.com - Promo code: "ALEX10" for 10% off
Recommended Channels to Subscribe to
Career Karma: https://youtube.com/channel/UCkCwv67-...
TheNewBoston: https://youtube.com/user/thenewboston
~
https://discord.com/invite/Yk3uqST
https://instagram.com/alexlorenlee
https://youtube.com/channel/UCLkeDGcXfiKlN2imazwkg4A (2nd channel)
Alex Lee
Видео Switch Case in Java канала Alex Lee
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Learn Java in 14 Minutes (seriously)Encapsulation in Java - Learn EncapsulationWhile Loop Java TutorialJava Programming Tutorial - 12 - Switch StatementJava Tutorial #6: Switch Statements | CASE | DEFAULT | Eclipse | Filipino | TagalogGetters and Setters - Learn Getters and Setters in JavaJava Else If Statements TutorialJava For Beginners: While, Do While & For Loops (7/10)Abstract Classes and Methods - Learn Abstraction in JavaBreak Java TutorialFactorial Program in Java with RecursionJava String Comparison Tutorial (Equals vs == in Java)Return Statement in Javaswitch Statement in JavaHashMap Java TutorialJava Access Modifiers - Learn Public, Private, Protected and DefaultJava Enum - Make Your Own EnumHow to get String Input from User in JavaJava Tutorial - 07 - The Switch StatementJava Exceptions - Learn Exceptions in Java