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

in java The statement: num = num + 1; produces the same result as: num++; T or FSolutionThe statement:num = num + 1; produces the same result as:num++; True Try

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site