The JVM spec is quite specific about this. There will only ever be one copy of
any code block. The compiler has no say in this regard as it's required to
produce
files compliant with the .class format, wherein the object data and the
code are
distinctly seperated. The JVM Spec is available online from the Java
Developers'
Connection, goto the documentation and it's a couple links below the JLS.
>Hello,
> suppose I declare a class with a huge amout of instance variables and
>many, long, instance methods.
>
>If I create thousands of objects of this class, of course there will be
required
>thousands times the space of the variables, but what about the method code?
>I guess it's not repicated, but this up to the compiler.
>
>Since it's likely to depend on the platform and JDK release, how does the
Linux
>javac behave?
<*> cabbey at rconnect dot com http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL++++ UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
------END GEEK CODE BLOCK------