Pessoal, essa pegadinha cai em exames para certificação Java. Vejam se conseguem respondê-la:
class X {
public static void main(String[] args) {
int i = 0;
while (i++ < args.length) {
System.out.print(args[i]);
};
}
}
Considere que o método acima é chamado usando o seguinte comando:
java X A B C D E F
Qual o resultado?
a. Prints: XABCDEF
b. Prints: ABCDEF
c. Compile-time error
d. Run-time exception
e. None of the Above
[/code]
