Answers for "how do i add a user input in the string in java"

14

taking string input in java

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

how to read input in java

//For continues reading a line
import java.util.Scanner; 

Scanner in = new Scanner(System.in); 
while(in.hasNextLine()) {
   String line = in.nextLine();
   System.out.println("Next line is is: " + line); 
}
Posted by: Guest on September-23-2020

Code answers related to "how do i add a user input in the string in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language