java:
public class App {
public static String name = "grayVTouch";
public static void say(){
System.out.println(App.name);
}
}
in the above calling methods, if the class name is changed, all related static calls need to be changed. It is troublesome. Is there a simple operation like PHP
?
PHP:
class Test {
public static $name = "grayVTouch";
public static function say(){
// self
echo self::$name;
}
}