Ввод 10 чисел с клавиатуры
public class MainClass
{
public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int[] list = new int[10];
for (int i = 0; i < list.length; i++)
{
String s = reader.readLine();
list[i] = Integer.parseInt(s);
}
}
}
Ввод 10 строк
public class MainClass
{
public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String[] list = new String[10];
for (int i = 0; i < list.length; i++)
{
list[i] = reader.readLine();
}
}
}