SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the Scanner class in Java
Scanner scan = new Scanner(System.in); String s = scan.nextLine(); System.out.println("String: " + s);