Prev Next

Java / Instance Variables (Non Static Variables)

Could not find what you were looking for? send us the question and we would be happy to answer your question.

1. Define Instance variables.
Posted on Apr 1, 2016 by Senthil Kumar.

Instance variables are variables that are defined at the class level. Instance variables need not have to be initialized since they are automatically initialized to its default value during object creation.

2. How the object references are initialized when it is a instance variable?

Object references are initialized to null in case of instance variables.

3. Is Instance variables thread safe in Java?

No.

«
»
Operators

Comments & Discussions