but then why the following code is not giving any error
class FrequencyException extends Exception{
public class Note{
public static void main(
String argv[]){
System.out.print(n.tune()); }
public int tune(){
try{
return play(444);
}catch(Exception e){
System.out.println(e.getMessage());
}catch(FrequencyException fe){
System.out.println(fe.getMessage());
} }
public int play(int iFrequency)throws FrequencyException{
return 1; }}
}
I guess when a method throws a checked exception there MUST be a throw statement in the method.here 'play' is not having any ..
is there any thing wrong in this theory...
thank you
rishi
