class Example {
public static void main(String args[]) {
System.out.printIn("This is a simple Java program.") ;
}
}
Run Code Online (Sandbox Code Playgroud)
我尝试通过命令提示符编译代码。错误信息如下:
Example.java:3: error: cannot find symbol
System.out.printIn("This is a simple Java program.") ;
^
symbol: method printIn(String)
location: variable out of type PrintStream
1 error
Run Code Online (Sandbox Code Playgroud)
我是java的初学者。请帮助理解错误。
你已经写了printIn而不是println。您输入的是大写字母,i而不是l(L)。因此编译器找不到该方法,因此出现错误cannot find symbol发生错误。
in代表line。lnprintln
| 归档时间: |
|
| 查看次数: |
1807 次 |
| 最近记录: |