Write method
Sir,
We can print using println method.But how we can print the contents of the array using write method for the same program. I am not getting any output for below program.
package ipop;
import java.io.*;
public class Array_print {
public static void main(String[] args) {
int[] a=new int[] {10,20,30,40,50,60,70,80,90,100};
for(int i=0;i<a.length;i )
System.out.write(a[i]);
}
}