+ 1

How to scan number in java

27th Aug 2017, 12:54 PM
Aditya Kumar Sharma
Aditya Kumar Sharma - avatar
2 Respuestas
+ 7
import java.util.*; public class Example { public static void main (String[] args) { Scanner in= new Scanner(System.in) int i=in.nextInt();//Integer char c=in.next().charAt(0)//Character String s=in.nextLine();//Sentence double d=in.nextDouble();//Double Decimal float f=in.nextFloat();//Floating Decimal long l=in.nextLong();//Long Number String word=in.next();//Word } } //Hope I helped...
27th Aug 2017, 2:47 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar