DEVFYI - Developer Resource - FYI

What is the default value of the local variables?

Java Interview Questions and Answers (part 3)


(Continued from previous question...)

558. What is the default value of the local variables?

The local variables are not initialized to any default value, neither primitives nor object references. If you try to use these variables without initializing them explicitly, the java compiler will not compile the code. It will complain abt the local varaible not being initilized..

(Continued on next question...)

Other Interview Questions