+ 2
How i can make an input and use it?
In Java
6 Answers
+ 3
You need to import Scanner class:
import java.util.Scanner;
And create object of Scanner:
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt() - for int numbers
String b = scanner.nextLine() - for text
https://www.sololearn.com/learn/Java/2220/
+ 2
thanks
+ 1
Your welcome.
+ 1
and how i can i make an second Input?
+ 1
My calculator doesnt work
https://code.sololearn.com/clYdNvxF082H/?ref=app
0
int first = scanner.nextInt();
int second = scanner.nextInt();