Код: Выделить всё
import java.util.Scanner;
public class userInput {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner obj = new Scanner(System.in);
System.out.print("Enter Number = "+ obj.nextInt());
String name = obj.nextLine();
System.out.print("Name = "+ name);
String stream = obj.nextLine();
System.out.print("Enter Stream = "+ stream );
}
}
Подробнее здесь: https://stackoverflow.com/questions/784 ... -from-user