如果将返回值改为float,这不会被标记成错误,因为test方法返回语句中的int会自动转换成float。
Changing the return type to float, for example, isn't flagged as an error because an int in the test method's return statement is automatically promoted to float.
一个类,它要么实现接口中描述的所有方法(然后这就是常见类),要么这个类实现接口中的一部分方法,然后这个类被标记成抽象类。
A class that implements an interface must implement all of the methods described in the interface, or be an abstract class.
应用推荐