Answers for "take input in java string"

14

taking string input in java

Scanner in = new Scanner(System.in);
String s = in.nextLine();
Posted by: Guest on April-27-2020
11

java get input

Scanner sc = new Scanner(System.in);
String s = sc.next();
int n = sc.nextInt();
double d = sc.nextDouble();
float f = sc.nextFloat();

// more fast way
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine(); // read line
int c = br.read();        // read single char
Posted by: Guest on May-14-2020

Code answers related to "take input in java string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language