0

Como hago para incluir scanner

3rd Sep 2018, 2:54 AM
Cristian Silva
Cristian Silva - avatar
3 ответов
+ 1
Gracias....
3rd Sep 2018, 6:18 PM
Cristian Silva
Cristian Silva - avatar
+ 1
De nada ... You're welcome : )
3rd Sep 2018, 6:21 PM
Ipang
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(); } }
3rd Sep 2018, 6:52 AM
Ipang