快捷导航

错误显示“Student cannot be resolved to a type”怎么解决

错误显示“Student cannot be resolved to           a type”怎么解决?

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员2

没有发现你的Student类,所以不能凭空创建Student类的对象的。
所以你需要创建一个Student类,看你的代码,这个Student类中应该至少包含name,age两个属性以及一个 speak()方法。
回复

使用道具 举报

定义一个Student类
回复

使用道具 举报

可能感兴趣的问答

发新帖
TA的信息
  • 会员所属: 注册会员
  • 认证信息: 邮箱认证手机认证
  • 微信访问
  • 手机APP