because i dont know how to determines wich type of error it will raise ...so the MethodNotFoundException comes in my head and thought it's probably this .... that's why i asked you about A FIRM RULE to know if an error will be catched by the complier or while excution ..
thanks for the code-tag tip and Sorry for my english
no problem friend.
if compiler didn't able to find something that you are referring or using or some kind of syntactical mistake ,then it will gives you a compiler error.
exception will be thrown when your program satisfies the compiler needs,but some illegal behavior like illegal reference or argument you are using cause your program to stop at run time.