ExamQuestions.com

Register
Login
Java SE 8 Programmer II Exam Questions

Oracle

Java SE 8 Programmer II

6 / 130

Question 6:

Given: public class Counter{ public static void main (String[ ] args) { int a = 10; int b = -1; assert (b >=1) : "Invalid Denominator"; int Ñ = a / b; System.out.println (c); } } What is the result of running the code with the ""ea option? 

Answer options:

A. -10
B. 0
C. An AssertionError is thrown.
D. A compilation error occurs.