0
Java program
How can i make an input place if i wanted to make it able to assign for variables.4 ex:name = "input here"; My quiestion is just...how can i do that?
4 Answers
+ 1
Depends on the type of input you would like take from the user.
Scanner sc = new Scanner(System.in);
// For String
String a = sc.nextLine();
// For integer
int b = sc.nextInt();
// For double
double c = sc.nextDouble();
And so on.
+ 3
What do you mean by input place?
do you mean....
String str=new Scanner(System.in).nextLine();
+ 2
Isn't it basically taking user input?
This is discussed in the course.
You must make use of Scanner class.
https://www.sololearn.com/learn/Java/2220/
0
Yes exactly, but what code should i use specificly?