I have learnt basic of java. I wanted to know about exception handling.
1) Is it OK to use
try{............
}catch(Exception ex){
........
}
instead of something more specific like
try{............
}catch(FileNotFoundException ex){
........
}
This way i do not know what type of exception will be thrown.
2) How to decide what part of code be inside try
block. Will it be bad if I put whole code inside `try' and turn my face.
3) If I have to be be specific about catch block, then how do I know what type of exception can be thrown ?