SlideShare a Scribd company logo
1 of 8
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;
—–
—–
}
Java Control Statements Presentation

More Related Content

What's hot (20)

Control statements in c
Control statements in cControl statements in c
Control statements in c
 
Operators in C++
Operators in C++Operators in C++
Operators in C++
 
Decision making and looping
Decision making and loopingDecision making and looping
Decision making and looping
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
Switch case in C++
Switch case in C++Switch case in C++
Switch case in C++
 
Control structures in java
Control structures in javaControl structures in java
Control structures in java
 
Function overloading
Function overloadingFunction overloading
Function overloading
 
C functions
C functionsC functions
C functions
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Mesics lecture 6 control statement = if -else if__else
Mesics lecture 6   control statement = if -else if__elseMesics lecture 6   control statement = if -else if__else
Mesics lecture 6 control statement = if -else if__else
 
Control Statement programming
Control Statement programmingControl Statement programming
Control Statement programming
 
Control statements
Control statementsControl statements
Control statements
 
Loops in c
Loops in cLoops in c
Loops in c
 
Control Statements in Java
Control Statements in JavaControl Statements in Java
Control Statements in Java
 
Preprocessor directives in c language
Preprocessor directives in c languagePreprocessor directives in c language
Preprocessor directives in c language
 
Preprocessor
PreprocessorPreprocessor
Preprocessor
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
 
Regular Expressions in Java
Regular Expressions in JavaRegular Expressions in Java
Regular Expressions in Java
 
The Loops
The LoopsThe Loops
The Loops
 
Data types in c++
Data types in c++Data types in c++
Data types in c++
 

Similar to Java Control Statements Presentation

Similar to Java Control Statements Presentation (20)

Control statements in java
Control statements in javaControl statements in java
Control statements in java
 
Control statements
Control statementsControl statements
Control statements
 
Java 2.pptx
Java 2.pptxJava 2.pptx
Java 2.pptx
 
Flow of control
Flow of controlFlow of control
Flow of control
 
Lecture 26.07.2014
Lecture 26.07.2014Lecture 26.07.2014
Lecture 26.07.2014
 
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
 
6.pptx
6.pptx6.pptx
6.pptx
 
slides03.ppt
slides03.pptslides03.ppt
slides03.ppt
 
Control structures
Control structuresControl structures
Control structures
 
java notes.pdf
java notes.pdfjava notes.pdf
java notes.pdf
 
Programming Fundamentals in C++ structures
Programming Fundamentals in  C++ structuresProgramming Fundamentals in  C++ structures
Programming Fundamentals in C++ structures
 
05. Control Structures.ppt
05. Control Structures.ppt05. Control Structures.ppt
05. Control Structures.ppt
 
Flow of control C ++ By TANUJ
Flow of control C ++ By TANUJFlow of control C ++ By TANUJ
Flow of control C ++ By TANUJ
 
Control structures in C
Control structures in CControl structures in C
Control structures in C
 
Java -lec-4
Java -lec-4Java -lec-4
Java -lec-4
 
CONTROL STMTS.pptx
CONTROL STMTS.pptxCONTROL STMTS.pptx
CONTROL STMTS.pptx
 
Chapter 4.1
Chapter 4.1Chapter 4.1
Chapter 4.1
 
22H51A6755.pptx
22H51A6755.pptx22H51A6755.pptx
22H51A6755.pptx
 
Lecture 7 Control Statements.pdf
Lecture 7 Control Statements.pdfLecture 7 Control Statements.pdf
Lecture 7 Control Statements.pdf
 
Java learning
Java learningJava learning
Java learning
 

Recently uploaded

chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 

Java Control Statements Presentation

  • 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; —– —– }