开发者

An interview question on the performExecute() in a controller command or taskcommand

In a recent interview which i attended i was aske开发者_JAVA百科d a question. It is as follows:

In a controller command we have a method named performExecute().But whenever we want to execute the controller command from any other controller command we will just call

controllerCmdObj.execute();

Why it is so?

Can anybody please answer this question?


Hey its the inheritence, you implement controllercommand interface or extend controllercommandImpl.

Inside the execute method of implemented super class they call performExecute.

So when you call your controller command's execute method the call goes to the execute of super class and from withing that the base class's performExecute gets called.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜