在我目前正在开发的应用程序,还有一个重要的功能,它调用许多可能的public static方法之一: $methodID = // carve up user's input to arrive at this
$importantValue = {{className}}::$methodID($arg); // {{ }} are to emphasize this is not the
我想在php中使用父/子类,但不是以子类的方式。举个例子,假设我们有一个班级的房子,而一所房子有门和窗户。 class House {
}
class Door {
}
class Window {
}
而我们有两种类型的门,比方说车库门和前门。 class GarageDoor extends Door {
}
class FrontDoor extends Door
我想了解我是如何克服“钻石问题”,在JAVA 让我们说我有这3个接口: interface Alpha{
public default int methodA() {
int result=0;
System.out.println("Print from Alpha methodA");
return result+4;
}
}
//