javascript
Brief description  about Online courses   join in Online courses
View vijay kumar thota 's Profile

not printing output

import java.io.*;
class Console4
{
public static void main(String [] args)
{
int i;
int[] A;
A=new int[10];
A[0]=10;
A[1]=20;
A[2]=30;
A[3]=40;
A[4]=50;
A[5]=60;
A[6]=70;
A[7]=80;
A[8]=90;
A[9]=100;
for(i=0;i<10;i )
{
System.out.write(A[i]);
}
}
}
Asked by vijay kumar thota | Sep 5, 2010 |  Reply now
Replies (1)
View arun kumar das 's Profile
Hi Vijay,

'i' is not incremented in the for loop here. However, 10 should be printed in here. Please check this.

It is advisable that write method be used only to print strings to the output.

Cheers...
Java Teacher
Sep 24, 2010