ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

The Switch Statement Decision Statement Part-3 JAVA-LEC07

#www.kietpatna.com

# kiet patna

decision making statements in java with examples

decision making statements in java pdf

iterative statements in java

jump statements in java

nested if statement in java

conditional statements in java

if statement in java

Автор: Kiet Patna

Загружено: 2021-12-07

Просмотров: 1237

Описание: JAVA PROGRAMMING LECTURE N0-07

Decision Making Statements Part-3.

2)The switch statement
Java has a built-in multi-way decision statement known as a switch. The switch statement tests the value of a given variable( or expression) against a list of case values and when a match is found, a block of statements associated with the case is executed.
Syntax :-
switch (expression )
{
case value-1:
block-1;
break;
case value-2:
block-2;
break;
…………….
……………..
default :
default block;
break;
…………………
}

Q-No-1: Write a JAVA program to perform Mini Calculator using Switch case.


Q-No-2: Write a JAVA program to check whether the given Character is Vowel or Not.

Q-No-3: Write a JAVA program to perform Arithmetic Operator using Switch case.

Decision Statements

The decision statement decides the statement to be executed after the success or failure of a given condition. The decision-making statement checks the given condition and then executes its sub-block.
Java language possesses decision-making capabilities supporting the following statements ;-
1. if statement
2. switch statement
3. conditional operator statement
These statements are popularly known as decision –making statements. Since these statements control the flow of executing, they are also known as control statements.
a) The if statement
b) The if-else statement
c) Nested if-else statement
d) The if-else-if ladder statement

a) The if statement
Java uses the keyword if to execute a set of command lines or one command line when the logical condition is true. It has only one option. The set of command lines or command lines are executed only when the logical condition is true.

Syntax :

if(condition)
statements;
e.g,
2. The if..else statement

The if..else statement takes care of true as well as false conditions. It has two blocks. One block is for if and it is executed when the condition is true. The other block is of else and it is executed when the condition is false. The else statement cannot be used without if. No multiple else statements are allowed with one if.

Syntax :

if(condition)
statement1;
else
statement2;
Nested if..else

if(condition)
statement;
else
statement;
else if(condition)
statement;
else

statement;


The if..else if ladder

Syntax :

if(condition1)
statement;
else if(condition2)
statement;
else if(condition3)
statement;
…………………….
else
statement;
e.g,
Please subscribe my channel for getting video related to information technology.
https://www.youtube.com/channel/UCbSg...
Follow on Facebook:   / kiet-patna-1.  .


Follow on Instagram:  / nasim.raja.10  

Download KIET PATNA App.
Patna's Top IT training Institute!!
https://play.google.com/store/apps/de...

   / @kietpatna3180  

#KIETPATNA #KHADIJAHINSTITUTEPATNA #SOFTWARETRAININGKIETPATNA

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
The Switch Statement Decision Statement Part-3 JAVA-LEC07

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Convert Into Dec to Bin and Find Leap Year LEC-08 IN-JAVA

Convert Into Dec to Bin and Find Leap Year LEC-08 IN-JAVA

КАСЬЯНОВ:

КАСЬЯНОВ: "Я видел это своими глазами. Это не публиковалось": что показали Путину, чего он боится

Coder vs Developer vs Software Engineer, What’s the Difference?

Coder vs Developer vs Software Engineer, What’s the Difference?

США заявили о победе Украины / Президент резко изменил план

США заявили о победе Украины / Президент резко изменил план

MS DOS Complete course Lecture # 18 format command

MS DOS Complete course Lecture # 18 format command

জাভাস্ক্রিপ্ট String মেথড slice | substring | substr | uppercase | lowercase | concat TODAY!

জাভাস্ক্রিপ্ট String মেথড slice | substring | substr | uppercase | lowercase | concat TODAY!

Comedy Club: Курсы альфа-самца | Кравец, Шальнов, Бутусов @ComedyClubRussia

Comedy Club: Курсы альфа-самца | Кравец, Шальнов, Бутусов @ComedyClubRussia

Похудей на 45 КГ, Выиграй $250,000!

Похудей на 45 КГ, Выиграй $250,000!

Мы Поймали ИХ! ЖИВЕМ В ЛЕСУ и Строим ДОМ. Николай Василенко В Гостях - Таежный Двор

Мы Поймали ИХ! ЖИВЕМ В ЛЕСУ и Строим ДОМ. Николай Василенко В Гостях - Таежный Двор

Почему Близкие Предают, Когда Вы Начинаете Сиять | Макиавелли

Почему Близкие Предают, Когда Вы Начинаете Сиять | Макиавелли

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]