Scanner sc = new Scanner(System.in);
String s = sc.next();
Where I want my string to be 'This is a string' When I print it only return 'This' if suppose i gave the above input because I've used space. So what I have to do in such a way that I should not use for loop to initialize such a string.