Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I check if an array key exists in java

807607Jan 31 2007 — edited Feb 1 2007
If I use a variable argument list is there a way to check how many of the variable arguments are set. For example:

public Object methodName(Object req_input, Object... add_inp)

I would like to know if add_input[0] is set, and also the number of add_inp[] entries that are set. Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2007
Added on Jan 31 2007
4 comments
1,245 views