Ola pessoal, sera que alguem pode me esclarecer a questão abaixo? Não entendi o porque da resposta, por gentileza!
public class Question_57 {
public static void main(String[] args) {
Float pi = new Float(3.14f);
if(pi>3){
System.out.println("pi is bigger than three");
}else{
System.out.println("pi is not bigger than three");
}
finally {
System.out.println("Have a nice Day");
}
}
What is the result?
A. Compilation fails. – a resposta correta é essa mas não entendi o porque??
B. pi is bigger than 3.
C. An exception occurs at runtime.
D. pi is bigger than 3. Have a nice day.
E. pi is not bigger than 3. Have a nice day.