Answer to Question #326773 in Java | JSP | JSF for timmy

Question #326773

What is the result of the following Java coding snippet?

class TestApp {

public static void main() {

int odd = 1;

if (odd) {

System.out.println("odd");

} else {

System.out.println("even");

}

}

}


Select one:

A. odd

B. Type mismatch error

C. Run-time exception

D. even


1
Expert's answer
2022-04-10T17:45:15-0400

Answer is: B.Type mismatch error


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS