Integer.parseInt() method is used for converting the data fed in form of strings into integer form.
import java.io.*;
class IntegerParseInt
{
public static void main(String args[])
throws IOException
{
BufferedReader BF= new BufferedReader(new InputStreamReader (System.in));
int Number[]=new int[5];
int i;
String m;
System.out.println("Enter 5 Numbers :");
for(i=0;i<=4;i++)
{
m=BF.readLine();
Number[i]=Integer.parseInt(m);
}
System.out.println("Your Entered 5 Numbers are :");
for(i=0;i<=4;i++)
{
System.out.println(Number[i]);
}
}
}