Relative Content

Tag Archive for static-keyword

Don’t Use “Static” in C#?

I submitted an application I wrote to some other architects for code review. One of them almost immediately wrote me back and said “Don’t use static. You can’t write automated tests with static classes and methods. static is to be avoided.”

OO PHP static keyword, should I use it?

I’m writing script for fb and I have 3 objects that I’ll be using through all classes. I’m wondering if there is any advantage in using the static keyword except I don’t have to create an instance every time I need to use a method/object? Which way should I go, with static or without it?

Why prefer non-static inner classes over static ones?

This question is about whether to make a nested class in Java to be a static nested class or an inner nested class. I searched around here and on Stack Overflow, but couldn’t really find any questions regarding the design implications of this decision.