如果我要重寫以下方法:覆蓋方法
public Machine makeMachine(String machineName, int machineSize)
{
return new Machine(machineName, machineSize);
}
有了:
public Machine makeDramaticMachine(String machineName, int machineSize)
{
return new DramaticMachine(machineName, machineSize);
}
這會是正確的嗎?
簽名仍然是這樣的:public machine makeMachine(String machineName,int machineSize) – AkshaiShah 2012-02-19 13:22:59