Ublic void test(int x) { int odd = 1; if(odd) /* Line 4 */ { - ProProfs
Topics-
Products +
     

Public void test(int x) { int odd = 1; if(odd) /* Line 4 */ { System.out.println("odd"); } else { System.out.println("even"); } }



A. Compilation fails.
B. \odd\ will always be output.
C. \even\ will always be output.
D. \odd\ will be output for odd values of x, and \even\ for even values.

This question is part of Test_3(27-8-2014)
Asked by Arunprasad on Sep 06, 2017

+ AnswerRequest Answer
...

1 Answer

arunprasad

Arunprasad

Answered on Sep 06, 2017

Compilation fails.
 Reply

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.