If I have an object O with a gigantic method f(), and I load 10000 examples of O into memory. Are 10000 examples of f() loaded into memory as well? If so, does that mean that I would save memory by making this function static if possible?
If I have an object O with a gigantic method f() , and I
Share
Instance Methods are loaded in to Method Area in JVM. it is loaded once , but there will be many stack for every call u make to f() , to keep track of there own local variable values.