数据类型应该是该方法返回值的类型。
The data type should be the return value of the method. The concrete example in Listing 3 should make this somewhat confusing requirement more clear.
一般情况下,返回值的类型取决于指定属性的类型。
In general, the type of the return value depends on the type of the specified attribute.
参数类型列于圆括号中,在最后列出了返回值的类型。
The types of the parameters of the method are listed inside of the parentheses, and the type of the return value is listed at the end.
So you're implementing this black box, and if its purpose in life is to actually return a value, you have to tell the compiler what kind of value to expect, and this is going to have ripple effects.
你在实现这个黑盒子,如果它的目的是,返回一个值,你必须告诉编译器你期望的是什么类型的值,这个将是一个连锁反应。
应用推荐