I found this problem with jdk 1.2.2 on RH LINUX VER 6.1 --------------------------- import java.io.*; public class rectangle { public static void main(String args[])throws IOException { looping: System.out.println("1 : update "); System.out.println("2 : get area "); System.out.println("3 : get circumference "); BufferedInputStream b=new BufferedInputStream(System.in); DataInputStream d=new DataInputStream(b); System.out.println(); System.out.println(); System.out.println(); System.out.print("Enter the code : "); String s=d.readLine(); int number=Integer.parseInt(s);