Re: Accessing static field
Dirk Bruere at NeoPax wrote:
Knute Johnson wrote:
Dirk Bruere at NeoPax wrote:
Qu0ll wrote:
"Dirk Bruere at NeoPax" <dirk.bruere@gmail.com> wrote in message
news:7bmeeeF23jro3U1@mid.individual.net...
markspace wrote:
Dirk Bruere at NeoPax wrote:
Netbeans throws up this warning because I have a class that
contains static data fields. OK to ignore, or am I missing
something here?
Probably not OK to ignore. Can you be more specific? How and
where are you accessing the field? At minimum you're making a
stylistic error. At worst your program won't compile. Hard to say
without an SSCCE.
Sorry, I get the little triangle and lightbulb next to the code -
not compiler warnings
Program compiles and runs OK, as expected.
If you move the mouse over the icon it should give you a bit more
info about why it is there.
Just "Accessing static field"
Code example:
public class MediaLists
{
public static DefaultListModel dvdListModel = new defaultListModel();
...
public void doStuffTo_dvdListModel(){}
}
MediaLists MedialList;
MediaList.doStuffTo_dvdListModel(); //Triangle and lightbulb
with //"Accessing static field" here
I don't know NetBeans but try making it final.
Good idea in any case.
You know if I had been right I would be brilliant but as it turns out, I
wasn't even lucky :-).
--
Knute Johnson
email s/nospam/knute2009/
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access