In Java, sometimes you would define an interface containg the constants: public interface MyInterface { public static final String YES = "yes"; } To access the contants, there are two ways public class WayOne { public void myMethod(){ String yes = MyInterface.YES; //... } } public class WayTwo implements MyInterface { public void myMethod(){ String yes = YES; //... } } I am asking which one is better? Or they are Ok and depend on the developer 's flavor?
signature --------------------------------- Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'