Does having more methods in a class mean that object uses more memory at runtime

Posted by frinkz on Stack Overflow See other posts from Stack Overflow or by frinkz
Published on 2010-05-29T16:41:19Z Indexed on 2010/05/29 17:02 UTC
Read the original article Hit count: 183

Filed under:

Say I have one class ClassBig with 100 methods inside, and a second with only 10 methods ClassSmall

When I have objects at runtime


ClassBig big = new ClassBig();
ClassSmall small = new ClassSmall();

Does the larger class take up more memory space?

If both classes contained an identical method, does the larger class take longer to execute it?

© Stack Overflow or respective owner

Related posts about java