Give an example where you might use a static method?
>> Monday, May 30, 2011
Static methods prove useful for creating utility classes, singleton classes and factory methods.
Utility classes are not meant to be instantiated. Improper coding of utility classes can lead to
procedural coding. java.lang.Math, java.util.Collections etc are examples of utility classes in Java.
Utility classes are not meant to be instantiated. Improper coding of utility classes can lead to
procedural coding. java.lang.Math, java.util.Collections etc are examples of utility classes in Java.
0 comments:
Post a Comment