Does the number of methods in a Java object affect how heavy it is?

I often read about heavy java objects and how making multiple instances of such objects can hamper performance. The singleton pattern is suggested as a solution to this problem. Correct me if am wrong , I think a heavy java object is one which has a huge number of variables or variables which have a huge number of variables inside them leading to the consumption of large amount of memory. My question is , will a class which has a huge number of methods but very few variables also count...

Read More »

By: StackOverFlow - Friday, 15 June

Related Posts