0

hi guys i have a couple of Qs.

1.what is javadoc and how it works?

2.what Strong typing means?

3.if we want to control the input ,it is better to use exeption handeling (try chatch),or a single is to control the worng input,
whitch one is faster?

4.look at the code bellow:
try{
//some code }
catch(ArithmaticExeption a){
}
catch(IndexOutOfBoundsExeption a){
}
look the both exeptions have the same name (a),is that right?

when i was reading a book i faced this questions(i have to mention
these are not book`s questions or homework).

thanks alot.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by stephen84s
1

1.what is javadoc and how it works?

2.what Strong typing means?

My Answer :- STFW

3.if we want to control the input ,it is better to use exeption handeling (try chatch),or a single is to control the worng input,
whitch one is faster?

Exception Handling should be used for only handling "exceptional" situations. What you have mentioned can be done by performing appropriate validations on Input

catch(ArithmaticExeption a){
}
catch(IndexOutOfBoundsExeption a){
}

Yes its perfectly fine to have both variables named "a", because "a" is visible only inside the corresponding catch blocks and not outside of them. It wouldn't have killed you to just compile a program with the above situation, if it was incorrect at most you would have received a compile error.

Votes + Comments
reputation is something
What happen serkan sendur ? Giving bad rep to an o/w good post is basically misusing the power of it. I had to do this to counter off the effect.
reputation is nothing
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.