Java编程新手-Javac问题 [英] new to programming in Java - issues with Javac
问题描述
我是Java编程的新手,正在尝试编译Java源文件,但是当我键入javac Welcome.java时,我不断收到以下消息
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?
谢谢.
推荐答案
Java是一种区分大小写的语言!任何拼写错误或键入错误的内容都会使您陷入错误. ,作为Java的初学者,您会期望得到它-在收到这些错误消息后,您将随着时间的流逝而学习.
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.
在Java中打印出一条语句的正确语法是
The correct syntax for printing out a statement in Java is
System.out.println("Print here whatever you wanna print!");
您得到的错误全部是因为您键入了错误的printIn
而不是println
----请参见I
而不是l
(字母el
应该在那儿了,而不是ahy
)!
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
)!
这篇关于Java编程新手-Javac问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!