Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #2866
| From | Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> |
|---|---|
| Newsgroups | comp.lang.java.help |
| Subject | Re: how to access static instance variables defined in static initializer block |
| Organization | N/A |
| References | <8ed39e6c-ccea-480e-b3a3-8b802957ede8@googlegroups.com> <vajk991tpcum44tfchrkbccqmaumuqmpho@4ax.com> |
| Message-ID | <lviov934wd.fsf@saunalahti.fi> (permalink) |
| Date | 2013-12-01 00:23 +0200 |
Roedy Green <see_website@mindprod.com.invalid> writes:
> On Mon, 18 Nov 2013 14:42:06 -0800 (PST), Marc B
>> static {
>> int sint1 =3D 6;
> you still have to declare your variables static, even in a static
> block
What do you mean?
Variables defined inside a block don't exist outside that block, and
static modifier isn't even legal within a static block or a method.
--
Jukka Lahtinen
Back to comp.lang.java.help | Previous | Next — Previous 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