new to programming in Java - issues with Javac [closed]

风格不统一 提交于 2019-12-20 06:14:12

问题


I am new to programming in Java and am trying to compile a Java source file but I keep getting the following message when I type javac Welcome.java

Welcome.java:5: error: cannot find symbol
     System.out.println("Welcome to Java!");
               ^

  symbol: method printIn<String>
  location: variable out of type PrintStream
1 error

any ideas on how to correct this?

Thanks.


回答1:


Java is a strongly case-sensitive language!Any mis-spellings or mis-typings will land you to erranous error.Take care from the next time DEAR,though,it's expected from you as a beginner in Java---you'll learn with time after getting these error messages.

The correct syntax for printing out a statement in Java is

System.out.println("Print here whatever you wanna print!");

The error which you are getting is all because you have mis-typed printIn instead of println----see I instead of l(alphabet el should have been there,not ahy)!



来源:https://stackoverflow.com/questions/24847622/new-to-programming-in-java-issues-with-javac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!