My Java Quiz

The ultimate place to learn Java!

Question #76: What is the output of the following code?

public class Instance {
    int num = 100;

    public void setNumber(int num){
        this.num = this.num * 2;
    }
    public void printNumber(){
        System.out.println(num);
    }
    public static void main(String[]args){
        Instance obj = new Instance();
        obj.setNumber(2);
        obj.printNumber();
    }
}