Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8264
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.wtal.de!news.tal.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | v_borchert@despammed.com (Volker Borchert) |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: borrowing Constants |
| Date | 24 Sep 2011 09:44:18 GMT |
| Organization | Private site at Eddersheim, Germany |
| Lines | 24 |
| Distribution | world |
| Message-ID | <j5k8pi$kv5$6@Gaia.teknon.de> (permalink) |
| References | <cf9q77h3gnhunlqpckpsobog4oqvlhiga7@4ax.com> |
| X-Trace | individual.net 0Em3FzjbNY4ggcTwigARywvwb2atHma89FCCqf3GTTkew3N7ni |
| Cancel-Lock | sha1:9dGoIvAe7Hmd2YwZAwFNxjxNqBg= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8264 |
Show key headers only | View raw
Roedy Green wrote:
> If you have some code like this:
>
> class A
> {
> static String VERSION = "1.0b";
> }
>
> and
> class B
> {
> static String VERSION = A.VERSION;
> }
>
> When you use Class B, does all of class A get instantiated?
> Does all of class A get put in B's jar?
If they're Constants, they should be final, and then the compiler
would "inline" the string into B's constant pool.
--
"I'm a doctor, not a mechanic." Dr Leonard McCoy <mccoy@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert <v_borchert@despammed.com>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
borrowing Constants Roedy Green <see_website@mindprod.com.invalid> - 2011-09-23 17:40 -0700
Re: borrowing Constants Arne Vajhøj <arne@vajhoej.dk> - 2011-09-23 20:44 -0400
Re: borrowing Constants Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-23 22:10 -0300
Re: borrowing Constants Roedy Green <see_website@mindprod.com.invalid> - 2011-09-23 18:39 -0700
Re: borrowing Constants Arne Vajhøj <arne@vajhoej.dk> - 2011-09-23 22:17 -0400
Re: borrowing Constants Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-09-25 11:25 -0700
Re: borrowing Constants Lew <lewbloch@gmail.com> - 2011-09-25 11:36 -0700
Re: borrowing Constants Arne Vajhøj <arne@vajhoej.dk> - 2011-09-23 22:30 -0400
Re: borrowing Constants Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-23 21:15 -0400
Re: borrowing Constants Roedy Green <see_website@mindprod.com.invalid> - 2011-09-23 18:43 -0700
Re: borrowing Constants markspace <-@.> - 2011-09-23 18:44 -0700
Re: borrowing Constants Lew <lewbloch@gmail.com> - 2011-09-23 19:19 -0700
Re: borrowing Constants Arne Vajhøj <arne@vajhoej.dk> - 2011-09-23 22:32 -0400
Re: borrowing Constants Lew <lewbloch@gmail.com> - 2011-09-23 19:11 -0700
Re: borrowing Constants Lew <lewbloch@gmail.com> - 2011-09-23 19:26 -0700
Re: borrowing Constants v_borchert@despammed.com (Volker Borchert) - 2011-09-24 09:44 +0000
Re: borrowing Constants Roedy Green <see_website@mindprod.com.invalid> - 2011-09-24 15:38 -0700
Re: borrowing Constants Roedy Green <see_website@mindprod.com.invalid> - 2011-09-24 17:09 -0700
Re: borrowing Constants Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-24 20:14 -0400
Re: borrowing Constants markspace <-@.> - 2011-09-24 18:18 -0700
Re: borrowing Constants Arne Vajhøj <arne@vajhoej.dk> - 2011-09-25 22:36 -0400
Re: borrowing Constants Arne Vajhøj <arne@vajhoej.dk> - 2011-09-25 22:35 -0400
Re: borrowing Constants Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-09-26 01:22 +0200
csiph-web