Advertisement
sergAccount

Untitled

Aug 9th, 2020
931
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.mycompany.app8;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class Test2 {
  13.    
  14.     public static void main(String[] args) {
  15.         // for
  16.         System.out.println("FOR");
  17.         for (int i = 0; i < 5; i++) {
  18.             System.out.println(i);            
  19.         }      
  20.         // while
  21.         System.out.println("WHILE");
  22.         int j = 0;
  23.         while(j<5){
  24.             System.out.println(j);
  25.             j++;
  26.         }
  27.     }    
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement