will static keywords tell one per JVM in Java ?

It is very good question during interview
so it wrong to say that static keyword say One per JVM , bcz class can be loaded in more than one classloader. And thus, static fields are not per-VM (as you might initially conclude), but per-classloader. Working in an app server or plugin environment using post-delegation classloaders, this comes up a lot

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.