Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Couple Of Programming Questions
#3
Static methods are also useful when the operation is always the same, and you can't be bothered to create a new object all the time.

For example, Java.lang.Math.random() (or wherever the Math class is; I always have to look it up) is a static method. You wouldn't want to have to create a "Math" class every time you use it... Which would have fairly useless properties anyway.
Reply


Messages In This Thread
Couple Of Programming Questions - by Conciente - 2009-04-21, 11:49 PM
Couple Of Programming Questions - by Thunda - 2009-04-22, 01:18 AM
Couple Of Programming Questions - by Morgana - 2009-04-22, 02:42 AM
Couple Of Programming Questions - by Spaz - 2009-04-22, 03:09 AM
Couple Of Programming Questions - by Nikkey - 2009-04-22, 06:53 AM
Couple Of Programming Questions - by GummyBear - 2009-04-22, 10:39 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)