I'm a bit new to Java. How do I compile a private utility method, checkSize(String[] data) that checks incoming data for every conceivable size or null error (Smaller data is okay. Bigger data or null is not ok). It should be in the form of a boolean.
Here is the pseudocode.
// Initially set all data objects to null here?
try
{
if (data != null && data.length > 0)
{
System.out.println(data.length);
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
return true;
}