Pessoal não entendi a resposta da seguinte questão:
Given:
public class TesteAssert
{
public static void main(String[] args)
{
int x = 0;
assert(x > 0): "assertion failed";
System.out.println("finished");
}
}
What is the result?
A. finished
B. Compilation fails
C. An AssertionError is thrown
D. An AssertionError is thrown and finished is output.
Pra mim a resposta correta seria a letra D.
Alguém pode me falar a resposta correta e o por que???
Valeu....