Tagged: java control statements

Java Break Statement 0

Java Break Statement

Java Break Statement is used to break program flow with a specified condition.For example break statement can be used to break from the inner loop.The other use of Java Break Statement is in Java Switch...

Java do-while loop 0

Java do-while Loop

Java do-while Loop is used to iterate program code several times.If the number of iteration are not fixed, the do-while loop is the best to use. Do-while loop is first executed once before the...

Java While Loop 0

Java While Loop

Java While Loop is used to execute a program code many times which is not fixed. Syntax: while(condition to test){ // execute this code } Java While Loop Example   public class JavaWhileLoop {...

Java  Loop Control Statements 0

Java Loop Control Statements

Java  Loop Control Statements are used when you need to execute a certain program code severally.The statements are executed sequentially one after the other. Types of Java Loop Control Statements 1.Simple for loop 2.For...

Java Switch Statement 0

Java Switch Statement

Java Switch Statement just like if-else ladder,its executes one code block from several conditions. Java Switch Statement Syntax   switch(expression ) { case 1: value //excute this code  if true is returned break; case...