Compare length of two strings: Difference between revisions

m
Line 129:
}
//@todo: StringBuilder may be faster
stream.println(QUOTE + strings[i] + QUOTE + " has length " + length
+ " and " + predicate);
}
Line 137:
 
{{output}}
<pre>"123456789" has length 9 and is the longest string
"1234567" has length 7 and is neither the longest nor the shortest string
"abcdef" has length 6 and is neither the longest nor the shortest string
"abcd" has length 4 and is the shortest string</pre>
 
=={{header|jq}}==