Search Results

Search found 1 results on 1 pages for 'user292844'.

Page 1/1 | 1 

  • Java NullPointerException. Why?

    - by user292844
    I am new to Java. I just read that class variables in Java have default value. I tried the following program. I was expecting to get the output as 0, which is the default value on an integer, but I get the NullPointerException. What am I missing? class Test{ static Integer iVar; public static void main(String...args) { System.out.println(iVar.intValue()); } }

    Read the article

1