import java.util.Scanner;
public class Test {
public static void main(String[] args) throws Exception {
Scanner s = new Scanner(System.in);
System.out.print("Enter data :");
String name = s.nextLine();
System.out.println(name);
}
}
Output:
Enter data :JavaStuff.in
JavaStuff.in