Which is an appropriate use of a static method?
- A A factory or utility function that needs no instance state
- B Storing per-request user data
- C Managing database connections per user
- D Holding form state
Answer
A factory or utility function that needs no instance state
Static state is shared globally, which makes code hard to test and dangerous in long-running processes. Use it sparingly.





