Using consts in static classes

UPDATE: This question was the subject of my blog on June 10th, 2010. Thanks for the great question! why was the decision made to not force constants to use the static modifier if they are considered static? Suppose constants are considered to be static. There are three possible choices: Make static optional: “const int x…” … Read more

Is there a way to make sure classes implementing an Interface implement static methods?

You cannot require classes to implement particular static methods through an interface. It just makes no sense in Java terms. Interfaces force the presence of particular non-static methods in the classes that implement the interface; that’s what they do. The easiest way is definitely to have some sort of factory class that produces instances of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)