+ 1
How to scan number in java
1 Odpowiedź
+ 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...