943,544 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 328
  • Java RSS
Mar 8th, 2009
0

some Qs

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
xlx16 is offline Offline
10 posts
since May 2008
Mar 8th, 2009
1

Re: some Qs

Quote ...
1.what is javadoc and how it works?

2.what Strong typing means?
My Answer :- STFW

Quote ...
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

Quote ...
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.
Last edited by stephen84s; Mar 8th, 2009 at 3:55 am.
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Bar Chart JApplet Drawer.. My Version
Next Thread in Java Forum Timeline: Comparing strings in Java?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC