
how can we throw unkown exception using throws clause...?

To throw an exception using throws clause, we have defined a file which is not existed. Here is the code:
import java.io.*;
class ReadData
{
public static void main(String[] args) throws Exception
{
BufferedReader br=new BufferedReader(new FileReader("dd.txt"));
String st;
while((st=br.readLine())!=null){
System.out.println(st);
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.