: I want use a loop to output the content of a String Array like
:
: String[] NameList;
: ...
: for(i=0;i<n;i++)
: {
: System.out.println(NameList[i]);
: }
:
: but my problem is I don't know how many elements are there
: in this array, I don't know how to get the value
n.
: Any thought will be appreciated.
:
Arrays have a "property" called length. Here's how to use it:
for(i=0;i<NameList.length;i++)
Help = (Throwable.getStackTrace() == null || SourceCode == null) ? null : getHelp(e, SourceCode);