fork download
  1. import java.util.Scanner;
  2. class Jtutorial1 {
  3. public static void main(String args[]){
  4. Scanner input = new Scanner(System.in);
  5. int i=0, j=0;
  6.  
  7. //Dummy record / sentinel controlled loop.
  8.  
  9. while (i < 100){
  10. j = i*5;
  11. System.out.println("The value of i is:" + i + " And the value of J is: "+ j );
  12. i++;
  13. if (j > 400){
  14. break;
  15. }
  16. }
  17. System.out.println("Outside the loop -- ");
  18.  
  19.  
  20. }//end main
  21. }//end class
Success #stdin #stdout 0.07s 213760KB
stdin
Standard input is empty
stdout
The value of i is:0  And the value of J is:  0
The value of i is:1  And the value of J is:  5
The value of i is:2  And the value of J is:  10
The value of i is:3  And the value of J is:  15
The value of i is:4  And the value of J is:  20
The value of i is:5  And the value of J is:  25
The value of i is:6  And the value of J is:  30
The value of i is:7  And the value of J is:  35
The value of i is:8  And the value of J is:  40
The value of i is:9  And the value of J is:  45
The value of i is:10  And the value of J is:  50
The value of i is:11  And the value of J is:  55
The value of i is:12  And the value of J is:  60
The value of i is:13  And the value of J is:  65
The value of i is:14  And the value of J is:  70
The value of i is:15  And the value of J is:  75
The value of i is:16  And the value of J is:  80
The value of i is:17  And the value of J is:  85
The value of i is:18  And the value of J is:  90
The value of i is:19  And the value of J is:  95
The value of i is:20  And the value of J is:  100
The value of i is:21  And the value of J is:  105
The value of i is:22  And the value of J is:  110
The value of i is:23  And the value of J is:  115
The value of i is:24  And the value of J is:  120
The value of i is:25  And the value of J is:  125
The value of i is:26  And the value of J is:  130
The value of i is:27  And the value of J is:  135
The value of i is:28  And the value of J is:  140
The value of i is:29  And the value of J is:  145
The value of i is:30  And the value of J is:  150
The value of i is:31  And the value of J is:  155
The value of i is:32  And the value of J is:  160
The value of i is:33  And the value of J is:  165
The value of i is:34  And the value of J is:  170
The value of i is:35  And the value of J is:  175
The value of i is:36  And the value of J is:  180
The value of i is:37  And the value of J is:  185
The value of i is:38  And the value of J is:  190
The value of i is:39  And the value of J is:  195
The value of i is:40  And the value of J is:  200
The value of i is:41  And the value of J is:  205
The value of i is:42  And the value of J is:  210
The value of i is:43  And the value of J is:  215
The value of i is:44  And the value of J is:  220
The value of i is:45  And the value of J is:  225
The value of i is:46  And the value of J is:  230
The value of i is:47  And the value of J is:  235
The value of i is:48  And the value of J is:  240
The value of i is:49  And the value of J is:  245
The value of i is:50  And the value of J is:  250
The value of i is:51  And the value of J is:  255
The value of i is:52  And the value of J is:  260
The value of i is:53  And the value of J is:  265
The value of i is:54  And the value of J is:  270
The value of i is:55  And the value of J is:  275
The value of i is:56  And the value of J is:  280
The value of i is:57  And the value of J is:  285
The value of i is:58  And the value of J is:  290
The value of i is:59  And the value of J is:  295
The value of i is:60  And the value of J is:  300
The value of i is:61  And the value of J is:  305
The value of i is:62  And the value of J is:  310
The value of i is:63  And the value of J is:  315
The value of i is:64  And the value of J is:  320
The value of i is:65  And the value of J is:  325
The value of i is:66  And the value of J is:  330
The value of i is:67  And the value of J is:  335
The value of i is:68  And the value of J is:  340
The value of i is:69  And the value of J is:  345
The value of i is:70  And the value of J is:  350
The value of i is:71  And the value of J is:  355
The value of i is:72  And the value of J is:  360
The value of i is:73  And the value of J is:  365
The value of i is:74  And the value of J is:  370
The value of i is:75  And the value of J is:  375
The value of i is:76  And the value of J is:  380
The value of i is:77  And the value of J is:  385
The value of i is:78  And the value of J is:  390
The value of i is:79  And the value of J is:  395
The value of i is:80  And the value of J is:  400
The value of i is:81  And the value of J is:  405
Outside the loop --