Java初识@造型专家_day_01_2021/03/22
先来说一说,运行了几遍代码出了的错误:
1.编写hello world时就报错
长时间没有编写java程序,犯了很严重的错误,直接在类里面写入输出,没有把输出放入方法里。
具体报错提示为:
Multiple markers at this line
- Syntax error, insert “Identifier (” to complete
MethodHeaderName
- Syntax error, insert “)” to complete MethodDeclaration
- Syntax error on token “.”, @ expected after this token
- Syntax error, insert “SimpleName” to complete
QualifiedName
2.进行改错后又出错
这里定义一个方法,把输出放入方法里,又出错了,这是因为写方法名时,方法名后忘记加入括号。
具体报错提示为:
Multiple markers at this line
- void is an invalid type for the variable caption
- Syntax error, insert “;” to compl