-1

Yes , this question is little bit vague and any serious programmer would laugh about it ! Although java does not tell about the sizes it assigns to the varibles ,i mean it can give more memory or less memory depending on the situation( that way it is abstracted !)i know that stuff! but what i am asking is ,is there any technique that i can know about the runtime variable size ? i want to find the addresses of the variables too ! This question does not want any answers like ,see java docs it does not provide those functionality you have asked , i want some kind of hack to do this kind of stuff!

Vamsi Pavan Mahesh
  • 240
  • 1
  • 8
  • 30

1 Answers1

-2

Well, There is no such direct way to get accurate size consumed by each object in JVM. Although you can you use JCONSOLE or other similar monitoring tool to get footprints of the objects dynamically. Again, this is more towards monitoring and performance tuning.

Thanks, Anil

Anil Patel
  • 21
  • 2