What is the result?

int i, j=0;
i = (3* 2 +4 +5 ) ;
j = (3 * ((2+4) + 5));
System.out.println(“i:”+ i + “\nj”:+j);

What is the result?

int i, j=0;
i = (3* 2 +4 +5 ) ;
j = (3 * ((2+4) + 5));
System.out.println(“i:”+ i + “\nj”:+j);

What is the result?

A.
Option A

B.
Option B

C.
Option C

D.
Option D



Leave a Reply 4

Your email address will not be published. Required fields are marked *


lolwut?

lolwut?

Can someone care to explain to me what the hell???

Somebody FUBAR’ed here with the answer selections.

Still, I’d like to point out to all about two things I noticed :

After variables i and j were instantiated as type int and initialized to a value of 0, it then has them being given values again which makes no sense because in this problem, the original i and j are never used.

Removing the value of zero would fix that, though.

Another thing to notice is an apparent typo(intentional?) in the println statement.

there is a Colon outside the final string and preceding the concatenator(+).

I don’t know what the selections are but if the problems I pointed out above are listed, select THAT as your answer.

lolwut?

lolwut?

Or perhaps this is more or less a math problem and if so, then the output would be

i:15
j:33

lolwut?

lolwut?

and that’s if the println statement wasn’t an intentional typo….

lolwut?

lolwut?

“After variables i and j were instantiated as type int and initialized to a value of 0, it then has them being given values again which makes no sense because in this problem, the original i and j are never used.

Removing the value of zero would fix that, though.”

>>> Forget I said that….