i am using scanner class, i faced problem when i tried to get a string with space. How can i modify my code to solve the problem. Here is my code:
import java.util.Scanner;
class abc
{
public void main(String[] args)
{
Scanner abc = new Scanner(System.in);
System.out.print("Name: ");
String nameStr = abc.next();
}
}