Skip to Main Content

New to Java

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!

checking for multiple null values

807600Aug 14 2007 — edited Aug 14 2007
I have up to 30 strings which I need to check for null or empty. Is there a quicker way of doing it than:
if ( (str1==null or str1.equals("")) || (str2==null or str2.equals(""))...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2007
Added on Aug 14 2007
12 comments
1,361 views