Java Beginner Programming Tutorial 17 Switch Statement

preview_player
Показать описание
How to use a switch statement in java
Рекомендации по теме
Комментарии
Автор

There is actually a difference between If/Else/Else if statements.

Unlike if-then and if-then-else, the switch statement allows for any number of possible execution paths. A switch works with the byte, short, char, and int primitive data types.

poketweaker
Автор

the code you asked has been sent as a message to your fbk fan


arnwriter
Автор

i just thought i could make a program that executes difrnt fnctns 4 age groups.. but it is not accepting when i type case age > 10 ... any ideas .. 4 d crct syntax

arnwriter
Автор

can you put in comment an exemple with name? please

thank you

BlackWolF_
Автор

Hi, excuse me if I want replace "age" with "name", what is the code for name?!
I want put the name in place of age!
I know "int" is for number but I don't know, what should I write for name?!

BlackWolF_
welcome to shbcf.ru