We can create stream from List of string like this
List<String> list = Arrays.asList("somestring");
Stream<String> stream = list.stream();
But how to create stream directly from string.
String x = "somestring";
You can use Stream.of which returns a sequential Stream containing a single element.
Stream<String> stream = Stream.of(x);