logo

Crowdly

What is the output of this program? public class Test { public static void ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What is the output of this program?

public class Test {

public static void main(String[] args) {

int nb = 4;

incrementByTwo(nb);

System.out.println("nb = " + nb);

}

 public static void incrementByTwo(int num) {

num = num + 2;

}

}
More questions like this

Want instant access to all verified answers on moodle.polytechnic.bh?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!