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

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, Last updated: Jan 17, 2020

+ Answer
Request

1 Answer

arunprasad

Arunprasad

Answered Sep 06, 2017

Compilation fails.
 

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.