Yes, you can also use a scanner to read data from text files, as we'll learn about in Chapter 6...
You can also use a Scanner to parse a String directly... e.g.
String data = "15 22.5 35";
Scanner inputSource = new Scanner(data);
int firstNum = inputSource.nextInt();
double secondNum = inputSource.nextDouble();