0

What is syntax used for accepting input values in java

27th Aug 2017, 10:35 AM
Kisan Garde
Kisan Garde - avatar
7 Antworten
+ 18
SoloLearn Java course covers this question. Java course -> Basic Concepts -> Getting user input.
27th Aug 2017, 10:40 AM
Igor Makarsky
Igor Makarsky - avatar
+ 10
import java.util.Scanner; //in the program Scanner s=new Scanner(System.in); s.next();//for String input s.nextInt();//for Integer s.nextDouble();//for decimal
27th Aug 2017, 10:41 AM
Nithiwat
Nithiwat - avatar
+ 3
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, 11:27 AM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar
0
3
27th Aug 2017, 6:39 PM
justin porquin
0
j
27th Aug 2017, 6:39 PM
justin porquin
0
First . I p7 I m
27th Aug 2017, 6:39 PM
justin porquin
0
illp
27th Aug 2017, 6:39 PM
justin porquin