*
The moose likes Beginning Java and the fly likes Static This, Static That Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Static This, Static That" Watch "Static This, Static That" New topic
Author

Static This, Static That

henri henri
Ranch Hand

Joined: Oct 03, 2005
Posts: 115
can one use too many static references in a program?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Yes, absolutely. In fact, many if not most uses of "static" that I see are ill-considered. A static variable is awfully like the dreaded global variables of procedural languages. They lead to highly-coupled, hard to maintain code.


[Jess in Action][AskingGoodQuestions]
henri henri
Ranch Hand

Joined: Oct 03, 2005
Posts: 115
acknowledged
 
Don't get me started about those stupid light bulbs.
 
subject: Static This, Static That
 
Similar Threads
WA #1.....word association
static and non static methods
property file dynamic vs static
Single tone Vs Static
static and non static methods