Here you can find the source of anyAreEmpty(String... words)
Parameter | Description |
---|---|
words | the array of words to check |
public static boolean anyAreEmpty(String... words)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w. ja v a 2s . c om * Return whether any of the input strings are empty or null. * * @param words the array of words to check * @return true if any of the words are empty or null */ public static boolean anyAreEmpty(String... words) { for (String word : words) { if ((word == null) || word.isEmpty()) { return true; } } return false; } }