What is the default value of an int instance variable in Java?
Correct answer
D. 0
14 views
D. 0
14 views
Instance variables of type int default to 0. Object references default to null, and local variables get no default at all: they must be initialised before use.
Asked in: NTS, PPSC, FPSC, OCA Java
Not sure why the answer is D? Ask here and get an explanation.