What is the result?

Given:

What is the result?
A. 400 200
B. 200 200
C. 400 400
D. Compilation fails.

Download Printable PDF. VALID exam to help you PASS.

3 thoughts on “What is the result?

  1. public static void main(String[] args) {
    int var1=200;
    System.out.println(doCalc(var1));//400
    System.out.println(var1);//200
    }
    static int doCalc(int var1){
    var1 = var1*2;
    return var1;
    }

Leave a Reply

Your email address will not be published. Required fields are marked *