Question: ```
import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {
            Scanner sc=new Scanner(System.in);
            String s=new String();
            int x=sc.nextInt();
            double y=sc.nextDouble();
            s = sc.next();

            System.out.println("String:"+s);
            System.out.println("Double: "+y); 
            System.out.println("Int: "+x);     
     }       
}

```

it scans only one word pleasd give any suggestions...

Answer: 
```
s = sc.next();

```

> 
> it scans only one word pleasd give any suggestions...
> 
> 
> 

This is what `next();` is intended to do. If you want to read multiple words, the simplest solution is to read a line of text. e.g.

```
String s = sc.nextLine();

```

If you need to read multi-line text, you need to workout a strategy for doing this such as reading everything in a loop until you have a blank line.

Note: while the answer is similar to [Scanner is skipping nextLine() after using next(), nextInt() or other nextFoo() methods](https://stackoverflow.com/questions/13102045/skipping-nextline-after-using-next-nextint-or-other-nextfoo-methods) the difference is that you don't *discard* the rest of the line, but rather you use the String returned by `nextLine();`

If you are expecting the input to be

```
 1 2.0 Hello World

```

then you want to use the suggestion above, however if the input is on multiple lines like this

```
 1 2.0
 Hello World

```

You will need to discard the rest of the line with an extra class to `nextLine()` as the link above suggests.
```
import java.util.Scanner;

public class Solution 
{
    public static void main(String[] args) 
    {
     Scanner scan = new Scanner(System.in);
     int i = Integer.parseInt(scan.nextLine());
     double d = Double.parseDouble(scan.nextLine());
     String s = scan.nextLine();

     System.out.println("String: " + s);
     System.out.println("Double: " + d);
     System.out.println("Int: "+ i);
     }
}

```