Menu
Question Index
...

What will be the output of the following program?

public class Global {
    static Integer number;
    public static void myFunction(Integer x) {
        ++x;
        System.out.println(x);
    }
    public static void main(String arg[]) {
        myFunction(number);
    }
}


1
0
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java Number Class

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App