Memory performance question

Hello

I need to know what is preffered regarding memory usage :

1) using static methods or using non static methods

2) using static members or using non static members

because from a test a made, it seems that a combination of using static methods and non static members, is the best choise and leaves the biggest memory size in the JVM - which is very strange because i know that using statics is not a good practice in OO .

thanks

[470 byte] By [George_Smitha] at [2007-10-3 5:45:44]
# 1
You should use whichever one suits your need better.
CaptainMorgan08a at 2007-7-14 23:53:59 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
Both of them is OK with me, the question is which of them is beter to work with, in a meaning of MEMORY usage,thanks :)
George_.Smitha at 2007-7-14 23:53:59 > top of Java-index,Other Topics,Patterns & OO Design...
# 3
you should be choosing static or non-static on the basis of how the method or attribute is used in the object, not its memory footprint.RAM is cheap; good design is not. use the design that best models your problem, and set your JVM settings for GC and memory accordingly.%
duffymoa at 2007-7-14 23:53:59 > top of Java-index,Other Topics,Patterns & OO Design...
# 4

> Hello

> I need to know what is preffered regarding memory

> usage :

> 1) using static methods or using non static methods

> 2) using static members or using non static members

>

> because from a test a made, it seems that a

> combination of using static methods and non static

> members, is the best choise and leaves the biggest

> memory size in the JVM - which is very strange

> because i know that using statics is not a good

> practice in OO .

>

Then either your test design or the implementation (and probably both) is flawed.

jschella at 2007-7-14 23:53:59 > top of Java-index,Other Topics,Patterns & OO Design...