Did you read the error message?
D:\mycode>javac my1.java
my1.java:10: Method readDouble() not found in class java.io.BufferedReader. double d=br.readDouble();
That's why.
BufferedReader only gives you the advantage of buffering your reads from the stream. It does a 'read-ahead' from the stream so when you read, you are actually reading from the buffer which is faster than reading from the stream itself. Eventhough it wraps an input stream, it doesnot deal with any of the methods associated with the underlying inputstream object. So, if you have to use BufferedReader,
you should live with the high-level methods it provides for reading. Ofcourse, you can always use other ways to convert the
String that was read.
Hope that helps,
Ajith