import practicaloo.*; public class TextInputStreamTest { public static void main(String[] args) { System.out.println("Enter a number, I'll add two to it."); TextInputStream in = new TextInputStream(System.in); double x; // the number we wish to read x = in.readDouble(); System.out.println(x + 2); } }