User Profile
Collapse
Profile Sidebar
Collapse
smoothy
Last Activity: Jan 12 '12, 11:30 AM
Joined: Jan 11 '12
Location:
-
Ok, now I understand. Thank you :) -
Can you solve what the output will be?
The task is to figure out what the output will be to the java code below. Apparantly the answer is:
12
28
Why 28? I thought it was 26. tal1 is 7 and tal2 is (12+7). Then the last output would be 26. Why am I wrong?
...Code:int tal1=7, tal2=12; if (tal1++ > 7) System.out.println(tal1); else System.out.println(tal2); tal2+=tal1; System.out.println(tal1
No activity results to display
Show More
Leave a comment: