![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
You cannot define two class fields with the same name. It doesn't matter whether they are static or non-static or combination of static and non-static. In case of static fields the memory is allocated when the class is loaded for the first time whereas for non-static the memory is allocated when an object is created of that class. If you declare fileds like this then for stat class you can refer to static "a" as stat.a as well as using any object like Thanx Replies: |
Sponsored Links
|