The first question, where to usestatic methods in applets:
1) Not very often. It's not advisable for newcomers to start using static methods right away, because they're normally used in the wrong context. Static methods only share one object. If you have ten instances of one static method, they all share the same object.
2) You have your second question correct. You DON'T HAVE to do this, but it's good programming practice.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
1) not quite. Static methods don't share any object instance. Rather they don't have access to the object instances at all.
2) http://java.sun.com/docs/index.html see the coding conventions for what's the norm, and the language specs for what's required. Also check out the tutorial (it's not quite up to date but rather nice anyway). And of course the API docs which are vital to have and understand how to use.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
1) not quite. Static methods don't share any object instance. Rather they don't have access to the object instances at all.
I swear I use to know this! I'm glad you're hear, or else I would be making people more dumb.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20