Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Pascal Surget
Added: Sep 12, 2018 12:35 PM
Views: 0
  1. public class Sample {
  2.  
  3.     public static void main(String args[]) {
  4.         /* local variable Initialization */        int n = 1, times = 5;
  5.  
  6.         /* while loops execution */        while (n <= times) {
  7.             System.out.println("Java while loops:" + n);
  8.             n++;
  9.         }
  10.     }
  11. }