Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #2859
| Newsgroups | comp.lang.java.help |
|---|---|
| Date | 2013-11-18 15:01 -0800 |
| References | <8ed39e6c-ccea-480e-b3a3-8b802957ede8@googlegroups.com> <ca817691-9fe0-41d4-8da0-8cb8fc7e1bf5@googlegroups.com> |
| Message-ID | <f01e9955-5cb7-4300-ace2-226a81b459a4@googlegroups.com> (permalink) |
| Subject | Re: how to access static instance variables defined in static initializer block |
| From | Marc B <marc.at.compass@gmail.com> |
Ok, found that answer too somewhere: In Java, static means that it's a variable/method of a class, it belongs to the whole class but not to one of its certain objects. This means that static keyword can be used only in a 'class scope' i.e. it doesn't have any sense inside methods. So no 'static' keyword in any instance object like methods, just in the class initializer area as it is allocated during class creation, not instantiation. Marc
Back to comp.lang.java.help | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to access static instance variables defined in static initializer block Marc B <marc.at.compass@gmail.com> - 2013-11-18 14:42 -0800
Re: how to access static instance variables defined in static initializer block Marc B <marc.at.compass@gmail.com> - 2013-11-18 14:51 -0800
Re: how to access static instance variables defined in static initializer block Marc B <marc.at.compass@gmail.com> - 2013-11-18 15:01 -0800
Re: how to access static instance variables defined in static initializer block markspace <markspace@nospam.nospam> - 2013-11-18 15:26 -0800
Re: how to access static instance variables defined in static initializer block Lew <lewbloch@gmail.com> - 2013-11-27 16:05 -0800
Re: how to access static instance variables defined in static initializer block Roedy Green <see_website@mindprod.com.invalid> - 2013-11-30 12:41 -0800
Re: how to access static instance variables defined in static initializer block Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-12-01 00:23 +0200
csiph-web