0
How to give users input data to code like in C Print f & Scan f like that how to do in java ??
In Java
3 Respostas
+ 1
pls will you explian it
+ 1
how it works
0
Quick example: start by importing java.util.Scanner, then in your function, write:
int x;
Scanner scan = new Scanner(System.in);
System.out.print("Enter a number: ");
x = scan.nextInt();
System.out.println("Your number is " + x);