I am doing this program on Reading characters and I have types as it is that is there in the book.But still I am getting exceptions.

```
package Applets;

import java.io.*;

public class BRead extends InputStream{
    public static void main(String args[]){
        throws IOException   
        {
            char c;
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            System.out.println("enter characters,'q' to quit");
            do{
                c=(char) br.read();
                System.out.println(c);
            }while(c!='q')
        }
    }
}

```

Can anyone tell mw why the exceptions are coming??