I am on a new project, and the legacy java code is filled with Classes that are using private static methods, and often classes are implementing public static. its very hard to follow.
for example
public Car {
private static checkGas(){
..
}
public static startCar(){
..
}
}
Is there some design pattern I never heard of that would make this applicable?
I've always used public static methods , on "helper" classes that do not need Util.caculate(..)
, and the above "Car" example I wouldn't have a private static , or a public static...just private, public methods
Aucun commentaire:
Enregistrer un commentaire