0
Como hago para incluir scanner
3 odpowiedzi
+ 1
Gracias....
+ 1
De nada ... You're welcome : )
0
import java.util.Scanner;
public class ScannerExample
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
// Get int value
int intData = sc.nextInt();
// Get long value
long lngData = sc.nextLong();
// Get float value
float fltData = sc.nextFloat();
// Get double value
double dblData = sc.nextDouble();
// Get string value
String strData = sc.next();
System.out.println(intData + "\n" + lngData + "\n" + fltData + "\n" + dblData + "\n" + strData);
sc.close();
}
}