开发者社区 问答 正文

在上述示例代码中,testExtend 方法调用了 testService 的哪些方法?

在上述示例代码中,testExtend 方法调用了 testService 的哪些方法?

展开
收起
不吃核桃 2024-07-23 18:53:30 43 分享 版权
1 条回答
写回答
取消 提交回答
  • 在 JCode5 类的 testExtend 方法中,调用了 testService 的以下四个方法:

    testOther(new Student()); - 传递一个 Student 对象作为参数。
    testBean() - 间接调用 testService 的 testMuti 和 getStr 方法。
    baseTest() - 间接调用 testService 的 testBase 方法。
    尽管 baseTest 和 testBean 是类内部的其他方法,它们最终都调用了 testService 的方法。

    2024-07-23 20:40:33
    赞同 2 展开评论
问答地址: