SCJP
Visit my download page
Originally posted by Christina Ishii:
Is there a way to determine if the argument passed to a method is of type int? If you don't have control what will be passed (such as from user input), and the method specifies an int parameter, how to control this? (Other than try/catch).
Would appreciate any input, and any code examples. Thanks.
cmi
"JavaRanch, where the deer and the Certified play" - David O'Meara
Originally posted by Cindy Glass:
If the method signature uses an int and you pass it anything that is not an int or can not be widened into an int, the method will just not get called.
The line calling it will not compile with a "no such constructor" message.
SCJP
Visit my download page
"JavaRanch, where the deer and the Certified play" - David O'Meara
Originally posted by Randall Twede:
with objects you can use instanceof but int is not an object.
Arthur E. Lyman<BR>a_lyman@hotmail.com