找不到符号方法 printIn (string) 位置:变量类型为 PrintStream -java 编译错误

SAN*_*P D 0 java

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的初学者。请帮助理解错误。

aku*_*ykh 5

你已经写了printIn而不是println。您输入的是大写字母,i而不是l(L)。因此编译器找不到该方法,因此出现错误cannot find symbol发生错误。

in代表linelnprintln