SlideShare a Scribd company logo
Subject JAVA
Presentation of “CONTROL STATEMENT”
Submitted To : Satish
Bansal
Submitted By : Bharat
Rathore
Gaurav Shakya
Varsha Rajak
OUTLINES
• Definition
• Flow Diagram
• Selection Statement
• Iteration Statement
• Jump Statement
Control Statement
A control statement in java is a statement that
determines whether the other statements will be
executed or not. It controls the flow of a
program. An 'if' statement in java determines the
sequence of execution between a set of
two statements
Flow Diagram of CONTROL STATEMENT
Iteration Statement
Control Statements
Jump Statement
Selection Statements
If.. else
Switch..cas
e
while do while for
continue
break
Selection Statement
If-Else Statement
If the condition is true then, it will
execute the If block. Otherwise, it will
execute the Else block.
Switch Statement
Switch statement allows program to select
one action among multiple actions during the
program execution.
Syntax:
Switch(variable/value/expression){
Case :
// statements [];
Case :
// statements [];
…
default:
// statements [];
}
Syntax:
if(condition){
// statements (if Block)
}
else{
// statements (Else block)
}
Iteration
Statement
For loop
For loop is an entry control
loop. In for loop we are require
to pass three arguments
while loop
While loop is an entry control loop.
In while loop the condition is
checked first and then the
statements of the loop are
executed.
Do while loop
It is an exit control loop. In
the do while loop are
executed first and then the
condition is checked and this
loop is executed at least
once time whether the
condition is true or false
Syntax :
for(initialization ;test condition
;increment/decrement)
{
Statements;
Statements;
}
Syntax :
while(condition)
{
statements;
statements;
}
syntax:
do
{
statements;
statements;
}while(condition)
Jump Statement
Break
On execution of “break” statement
the control jumps out of the loop.
Syntax:
{
—-
—-
if (condition)
break;
—–
—–
}
Continue
On execution of “continue” statement
the control jumps to the beginning
of the loop.
Syntax:
{
—-
—-
if (condition)
continue;
—–
—–
}
Presentation of control statement
Ad

More Related Content

What's hot (20)

Oops ppt
Oops pptOops ppt
Oops ppt
abhayjuneja
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
Marwa Ali Eissa
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
Sathish Narayanan
 
OOPS In JAVA.pptx
OOPS In JAVA.pptxOOPS In JAVA.pptx
OOPS In JAVA.pptx
Sachin33417
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
Surbhi Panhalkar
 
Operator.ppt
Operator.pptOperator.ppt
Operator.ppt
Darshan Patel
 
Loops and conditional statements
Loops and conditional statementsLoops and conditional statements
Loops and conditional statements
Saad Sheikh
 
Loops in Python
Loops in PythonLoops in Python
Loops in Python
Arockia Abins
 
Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
Elizabeth alexander
 
Algorithm and c language
Algorithm and c languageAlgorithm and c language
Algorithm and c language
kamalbeydoun
 
Decision making in JAVA
Decision making in JAVADecision making in JAVA
Decision making in JAVA
Hamna_sheikh
 
Conditional statement c++
Conditional statement c++Conditional statement c++
Conditional statement c++
amber chaudary
 
Control structures in c++
Control structures in c++Control structures in c++
Control structures in c++
Nitin Jawla
 
Switch statement, break statement, go to statement
Switch statement, break statement, go to statementSwitch statement, break statement, go to statement
Switch statement, break statement, go to statement
Raj Parekh
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
Naz Abdalla
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
CPD INDIA
 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in c
vampugani
 
itft-Decision making and branching in java
itft-Decision making and branching in javaitft-Decision making and branching in java
itft-Decision making and branching in java
Atul Sehdev
 
Control Structures in Python
Control Structures in PythonControl Structures in Python
Control Structures in Python
Sumit Satam
 
If else statement in c++
If else statement in c++If else statement in c++
If else statement in c++
Bishal Sharma
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
Marwa Ali Eissa
 
OOPS In JAVA.pptx
OOPS In JAVA.pptxOOPS In JAVA.pptx
OOPS In JAVA.pptx
Sachin33417
 
Loops and conditional statements
Loops and conditional statementsLoops and conditional statements
Loops and conditional statements
Saad Sheikh
 
Algorithm and c language
Algorithm and c languageAlgorithm and c language
Algorithm and c language
kamalbeydoun
 
Decision making in JAVA
Decision making in JAVADecision making in JAVA
Decision making in JAVA
Hamna_sheikh
 
Conditional statement c++
Conditional statement c++Conditional statement c++
Conditional statement c++
amber chaudary
 
Control structures in c++
Control structures in c++Control structures in c++
Control structures in c++
Nitin Jawla
 
Switch statement, break statement, go to statement
Switch statement, break statement, go to statementSwitch statement, break statement, go to statement
Switch statement, break statement, go to statement
Raj Parekh
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
CPD INDIA
 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in c
vampugani
 
itft-Decision making and branching in java
itft-Decision making and branching in javaitft-Decision making and branching in java
itft-Decision making and branching in java
Atul Sehdev
 
Control Structures in Python
Control Structures in PythonControl Structures in Python
Control Structures in Python
Sumit Satam
 
If else statement in c++
If else statement in c++If else statement in c++
If else statement in c++
Bishal Sharma
 

Similar to Presentation of control statement (20)

Control statements in java
Control statements in javaControl statements in java
Control statements in java
Madishetty Prathibha
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C ppt
MANJUTRIPATHI7
 
Control statements
Control statementsControl statements
Control statements
CutyChhaya
 
_Java__Expressions__and__FlowControl.ppt
_Java__Expressions__and__FlowControl.ppt_Java__Expressions__and__FlowControl.ppt
_Java__Expressions__and__FlowControl.ppt
JyothiAmpally
 
_Java__Expressions__and__FlowControl.ppt
_Java__Expressions__and__FlowControl.ppt_Java__Expressions__and__FlowControl.ppt
_Java__Expressions__and__FlowControl.ppt
JyothiAmpally
 
Java 2.pptx
Java 2.pptxJava 2.pptx
Java 2.pptx
usmanusman720379
 
Flow of control
Flow of controlFlow of control
Flow of control
Shobhit Singhal
 
Lecture 26.07.2014
Lecture 26.07.2014Lecture 26.07.2014
Lecture 26.07.2014
vishal choudhary
 
6.pptx
6.pptx6.pptx
6.pptx
HarishNayak47
 
slides03.ppt
slides03.pptslides03.ppt
slides03.ppt
Anjali127411
 
Control structures
Control structuresControl structures
Control structures
Gehad Enayat
 
java notes.pdf
java notes.pdfjava notes.pdf
java notes.pdf
RajkumarHarishchandr1
 
Programming Fundamentals in C++ structures
Programming Fundamentals in  C++ structuresProgramming Fundamentals in  C++ structures
Programming Fundamentals in C++ structures
ayshasafdarwaada
 
chapter 8 class 10 icse board notes.pptx
chapter 8 class 10 icse board notes.pptxchapter 8 class 10 icse board notes.pptx
chapter 8 class 10 icse board notes.pptx
Neerajchauhan56039
 
05. Control Structures.ppt
05. Control Structures.ppt05. Control Structures.ppt
05. Control Structures.ppt
AyushDut
 
control-statements, control-statements, control statement
control-statements, control-statements, control statementcontrol-statements, control-statements, control statement
control-statements, control-statements, control statement
crrpavankumar
 
Control Statement programming
Control Statement programmingControl Statement programming
Control Statement programming
University of Potsdam
 
Flow of control C ++ By TANUJ
Flow of control C ++ By TANUJFlow of control C ++ By TANUJ
Flow of control C ++ By TANUJ
TANUJ ⠀
 
Control structures in C
Control structures in CControl structures in C
Control structures in C
baabtra.com - No. 1 supplier of quality freshers
 
Java -lec-4
Java -lec-4Java -lec-4
Java -lec-4
Zubair Khalid
 
Ad

Recently uploaded (20)

Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Journal of Soft Computing in Civil Engineering
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdfSmart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
PawachMetharattanara
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdfML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
rameshwarchintamani
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation RateModeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Journal of Soft Computing in Civil Engineering
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
Working with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to ImplementationWorking with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to Implementation
Alabama Transportation Assistance Program
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdfSmart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
PawachMetharattanara
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdfML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
rameshwarchintamani
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Ad

Presentation of control statement

  • 1. Subject JAVA Presentation of “CONTROL STATEMENT” Submitted To : Satish Bansal Submitted By : Bharat Rathore Gaurav Shakya Varsha Rajak
  • 2. OUTLINES • Definition • Flow Diagram • Selection Statement • Iteration Statement • Jump Statement
  • 3. Control Statement A control statement in java is a statement that determines whether the other statements will be executed or not. It controls the flow of a program. An 'if' statement in java determines the sequence of execution between a set of two statements
  • 4. Flow Diagram of CONTROL STATEMENT Iteration Statement Control Statements Jump Statement Selection Statements If.. else Switch..cas e while do while for continue break
  • 5. Selection Statement If-Else Statement If the condition is true then, it will execute the If block. Otherwise, it will execute the Else block. Switch Statement Switch statement allows program to select one action among multiple actions during the program execution. Syntax: Switch(variable/value/expression){ Case : // statements []; Case : // statements []; … default: // statements []; } Syntax: if(condition){ // statements (if Block) } else{ // statements (Else block) }
  • 6. Iteration Statement For loop For loop is an entry control loop. In for loop we are require to pass three arguments while loop While loop is an entry control loop. In while loop the condition is checked first and then the statements of the loop are executed. Do while loop It is an exit control loop. In the do while loop are executed first and then the condition is checked and this loop is executed at least once time whether the condition is true or false Syntax : for(initialization ;test condition ;increment/decrement) { Statements; Statements; } Syntax : while(condition) { statements; statements; } syntax: do { statements; statements; }while(condition)
  • 7. Jump Statement Break On execution of “break” statement the control jumps out of the loop. Syntax: { —- —- if (condition) break; —– —– } Continue On execution of “continue” statement the control jumps to the beginning of the loop. Syntax: { —- —- if (condition) continue; —– —– }
  翻译: