Considere que o código compile e execute corretamente e que assert está abilitada,
qual a saída e a explicação?
public class AssertTest {
private void methodA(int i){
assert i>=0 :methodB();
System.out.println(i);
}
private String methodB(){
return "The value most not negative";
}
public static void main(String[] args) {
AssertTest a = new AssertTest();
a.methodA(-10);
}
}
A - print -10
B - The value most not negative