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
----see 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屋!