Give the following code fragment:
int ch=30;
System.out.println(++ch);
System.out.println(ch);
i) What does the above code fragment produce?
ii) what is the effect of replacing ++ch with ch+1?
Answers
Answered by
1
Answer:
i) o/p
31
31
ii) o/p changes to
30
31
Similar questions