Java Programming Tutorial 21 - Switch Statement

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

if (name.equals("caleb") || name.equals("clare")){
System.out.println("Go away');
}
else{
System.out.println("Try again later");
}

That's my solution, i hope it has no errors!

Martin-wzrm
Автор

Clare is like a recurring theme throughout these videos and I've never wanted to know more about someone's life until I watched these videos. Who tf is Clare?? We need to know!

matthewhenington
Автор

You are THE BEST JAVA TEACHER I ever had !!! Thank you for all tutorials !!!

biggbrotther
Автор

Wow! Pramp?!?? I've never been able to do well in an interview... But with Pramp, I'll get off the streets for sure!

allenzhou
Автор

Props to you Caleb. Before I watched this video I had never even heard of the switch statement, let alone used it in coding. Thanks to you I now feel like I know exactly how to use it with confidence. You explained it brilliantly in 8 minutes. Thank you! :)

matttantony
Автор

I love your videos, Caleb! I'm taking Java Programming this semester in college, so this is extremely helpful!

leviconnelly
Автор

The way you introduce pramp in different ways every episode makes me laugh so hard and make me guess how will you do it on the next ep lol

michaelaalquino
Автор

if (name.equals("Caleb")) {
System.out.println("Welcome my man");
} else if (name.equals("Clare")) {
System.out.println("Go away");
} else {
System.out.println("Try again later");
}


Thank you so much for these tutorials!

crookedlobster
Автор

Woowww, I'm glad that I'm finally learning something. I also made a switch statement for fun. Here y'all go:

System.out.println("Who are you?");

Scanner scnr = new Scanner(System.in);
String student = scnr.nextLine();

switch(student){
case "Melissa":
System.out.println("Welcome" + '\t' + student + "!");
break;
case "Sammie":
System.out.println("What's up " + student + "?");
break;
default:
System.out.println("I dont even know you dog :/");
break;
}

ortaseleaisuan
Автор

i am finding this series incredibly useful. im doing engineering in university and im required to learn java. they really skipped over most of the important basics. im at the start of semester 2 and they only just wrote out a list of all primitive types where they expected us to use them like pros throughout semester 1 lol

joshuamorris
Автор

I Like your approach of teaching Java Programming. I appreciate you for investing your time to educate people like us. Thanks, Keep 'em coming! :)

akashshah
Автор

you made me under stand this on a another level not boring

JODECIFEENIN
Автор

if (name == "caleb") {
my man!");
String Access = "yes";
}
if (name == "clare") {
System.out.println("Go away");
String Access = "no";
}
else {
System.out.println("Try again later");
String Access = "no";

// I added the variable Access to simulate what it would probably be in real life to show the rest of your code that // the user does or does not have Access to your program.
// He was right about it having more Syntax. Although from my knowledge of python this code makes more sense // to me than the one he described in the video.

cameraday
Автор

Day 2 🙌 Done 21 out of 100, 79 more to go let's go! 🔥

hihellookay
Автор

Omgoodness After all this time of struggling, I finally understand. Thank you Caleb
System.out.println(happy face emoji with one tear); Lmaoo. Here is my if statement of my own tho ;P.

System.out.println("What is your name?");

Scanner scnr = new Scanner(System.in);
String name = scnr.nextLine();



if(name.equals("Johnny")){
System.out.println("What's Poppin :P");
}
else if(name.equals("Tommy")){
System.out.println("Heyyyy"+ '\t' + name);
}
else{
System.out.println("Nah fam, you gotta go, GoodBye.");
}

ortaseleaisuan
Автор

just like c++, i think knowing c++ made all these series easier.

Martin-wzrm
Автор

It seems to me like break is just serving a simular function to a closing curly brace. It is different in certain ways of course, but both of them seem to be some kind of closing syntax.

christianmetaldreamur
Автор

I think u can go to dub for Disney's movies with that voice of promoting Pramp

rittenbrake
Автор

hahaha for once i actually enjoy learning how to program you make it fun...and you nailed the Ad

kayheart
Автор

import java.util.Scanner;


public class MySweetProgram {

public static void main(String[] args) { // method
System.out.println("What's ya name?");

Scanner scanner = new Scanner(System.in);
String guess = scanner.nextLine();
String name = "Manuel";

if(guess.equals(name))
{
System.out.println("Welcome my man!");

} else if(guess.equals("Jane"))
{
System.out.println("You ain't no girl!");
} else
{
System.out.println("Try again.");
}
}
}


(Thanks for these vids Caleb, you're awesome!)

MannyR
visit shbcf.ru