What happens after you compile and run this code?

public class MyClass{
    static int i;
    public static void main(String[] args){
        System.out.println(i);
    }
}
Explanation
All numerical class fields are initialized to zero by default.
Java
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback