Answers for "continue statement in if else in java"

1

Continue statement in java

// continue in java example
import java.util.*;
public class ContinueJavaExample 
{
   public static void main(String[] args) 
   {
      for(int a = 1; a <= 10; a++)
      {
         if(a % 2 != 0)
         {
            continue;
         }
         System.out.println(a + " ");
      }
   }
}
Posted by: Guest on December-01-2020
2

continue in java

int i = 0;
while (i < 10) {
  if (i == 4) {
    i++;  //why do I need this line ?
    continue;
  }
  System.out.println(i);
  i++;
}
Posted by: Guest on June-17-2020
1

Continue statement in java

// continue in java example
import java.util.*;
public class ContinueJavaExample 
{
   public static void main(String[] args) 
   {
      for(int a = 1; a <= 10; a++)
      {
         if(a % 2 != 0)
         {
            continue;
         }
         System.out.println(a + " ");
      }
   }
}
Posted by: Guest on December-01-2020
2

continue in java

int i = 0;
while (i < 10) {
  if (i == 4) {
    i++;  //why do I need this line ?
    continue;
  }
  System.out.println(i);
  i++;
}
Posted by: Guest on June-17-2020

Code answers related to "continue statement in if else in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language