Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #2461
| From | Steve <tinker123@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.help |
| Subject | When to use static methods? |
| Date | 2013-01-17 16:15 -0500 |
| Organization | M.Y.O.B. |
| Message-ID | <kd9pmg$dt4$1@dont-email.me> (permalink) |
Hi, I was at a JUG roundtable workshop last night where various code review tools were being discussed. The facilitator kept mentioning how the use of static methods made automated code reviews more difficult and that he tried to minimize the use of static functions. I find static methods to be very convenient when the method doesn't need stored ( in the class it belongs to ) values. Instead of having to instantiate the object every time I want to use the method I just have to type the class name and the method. So, I would like to hear your opinion. When wouldn't I want to use static methods aside from the obvious( the method depends on member variable with changing values ) Steve
Back to comp.lang.java.help | Previous | Next — Next in thread | Find similar | Unroll thread
When to use static methods? Steve <tinker123@gmail.com> - 2013-01-17 16:15 -0500
Re: When to use static methods? markspace <markspace@nospam.nospam> - 2013-01-17 14:02 -0800
Re: When to use static methods? Lew <lewbloch@gmail.com> - 2013-01-17 15:04 -0800
Re: When to use static methods? Lew <lewbloch@gmail.com> - 2013-01-17 15:13 -0800
Re: When to use static methods? Roedy Green <see_website@mindprod.com.invalid> - 2013-01-17 15:01 -0800
csiph-web