-2
class Abc {

}

Suppose this is my class and I want to know the size the of that class. How can I calculate the size of a class created in Java. Even if I create an object of that particular class.

Reg
  • 10,717
  • 6
  • 37
  • 54
mahesh singh
  • 202
  • 1
  • 12
  • 1
    give an example. its unclear what you're asking. – Isaac Jun 19 '15 at 07:20
  • 1
    possible duplicate of [In Java, what is the best way to determine the size of an object?](http://stackoverflow.com/questions/52353/in-java-what-is-the-best-way-to-determine-the-size-of-an-object) – someOne Jun 19 '15 at 07:22
  • http://stackoverflow.com/questions/11252249/calculating-weight-of-an-object-howto That is what you need, assuming you talk about the memory cost an object has. – fill͡pant͡ Jun 19 '15 at 07:31

1 Answers1

0

If you want to know the memory size of the files you've created, you can go to your project's folder directory. There, in "src" folder, you can right-click any .java file and see its size. In the "bin" folder, there are also the binary .class files. Feel free to compare them.

Damian P.
  • 1
  • 1