在某些情况下可能出现不兼容,例如两个接口使用不同的返回值类型定义同一个方法。
Incompatibilities can arise when, for example, two interfaces define the same method with different return value types.
另一种避免这样的麻烦的方式是永远为方法返回值声明类型,特别是为公用api定义方法的时候。
Another way to prevent these problems is to always declare return types for methods, especially when defining methods for a public API.
为返回值和参数定义XML serializable类型。
Define XML serializable types for the return value (and the parameters).
应用推荐