0
Taking input from user using constructor
hi, please tell me how to take input input data from user if we have used parameterized constructor in our java class?
1 ответ
+ 4
You should use Scanner:
import java.util.Scanner;
Scanner s =new Scanner(System.in);
String input = s. nextLine();
//use nextFloat for a float, nextDouble for a double....