Rest of Program
public class TrivialApplication {
public static void main(String args[]) throws IOException {
BufferedReader stdin = new BufferedReader
(new InputStreamReader(System.in))
int userWidth = 0; int userLength = 0;
System.out.println("Width of your rectangle?");
userWidth = Integer.parseInt(stdin.readLine());
System.out.println("Length of your rectangle?");
userLength = Integer.parseInt(stdin.readLine());
Rectangle r = new Rectangle(userWidth, userLength);
System.out.print("In a rectangle of width " + userWidth);
System.out.print(" and length " + userLength + " the area is ");
System.out.println(r.area());
try { System.in.read(); // prevent console window from going away
} catch (java.io.IOException e) {} } }