I am using BufferedReader class to read inputs in my Java program. I want to read inputs from a user who can enter multiple integer data in single line with space. I want to rea
import java.io.*;
public class HelloWorld{
public static void main(String []args){
int i;
System.out.println("enter the array element");
InputStreamReader isr= new InputStreamReader();
BufferedReader ib= new BufferedReader(isr);
int a[]=new int [5];
for(i=0;i<5;i++)
{
a[i]= Integer.parseInt(ib.readLine(a[i]));
}
for(i=0;i<5;i++)
{
System.out.println(a[i]);
}
}
}