Why static variable not used in instance?
help me plz...
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hussain AhmedRank #1,271 · 1.4K reputationPosted Sep 14, 2014, 12:27 AM EDT
Check this.
http://www.coderanch.com/t/528608/java/java/Difference-Static-Instance-variable
VulpesRank #55 · 29.2K reputationPosted Sep 14, 2014, 6:33 AM EDT
Whilst instance members of the class or struct can refer to static variables, static members cannot refer to instance variables unless, exceptionally, you pass them to the static method as parameters.