taking string input in java
Scanner in = new Scanner(System.in);
String s = in.nextLine();
taking string input in java
Scanner in = new Scanner(System.in);
String s = in.nextLine();
java read string input
import java.util.Scanner;
public class YourClass {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String inputString = scanner.nextLine();
System.out.println("Your string: " + inputString);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us