in java The statement num num 1 produces the same result a
in java
The statement:
num = num + 1;
produces the same result as:
num++;
T or F
Solution
The statement:num = num + 1; produces the same result as:num++;
True
Try this program--->
javaPro.java
class javaPro{
public static void main (String args[]) {
int num;
num=10;
//num = num + 1;
num++;
System.out.println(num);
}
}
Output:-
11
