class JMM101 {
public static void main(
String[] args) {
int i = 0;
while (i++ < args.length) {
System.out.print(args[i]);
}}}
java JMM101 A B C D E F
What is the result of attempting to compile and run the program using the specified command line?
a. Prints: JMM101ABCDEF
b. Prints: ABCDEF
c. Compile-time error
d. Run-time error
e. None of the above
I answered b, but the correct ans is d.
In the while loop, we take the value of i, compare the same and then increment right?
wht wud be the effect if it was while(++i,args.length)?