Home > Back-end >  The small white problem
The small white problem

Time:10-12

Clearly code written by the way, why don't compile successfully? Hope leaders can solve

CodePudding user response:

The class name and file name

CodePudding user response:

System. The out. Println println is all lowercase,

Learn Java, first with the IDE

CodePudding user response:

System. The out. Println (" Hello, World "); Pay attention to the print p is lowercase, after every change, want to use javac recompiling

CodePudding user response:

Java very the attention case-sensitive, println all lowercase, a public file name must be the same as the public class names

CodePudding user response:

There is no public use any a class name as the file name

CodePudding user response:

The
reference 3 floor weixin_41900958 response:
System. Out. Println (" Hello, World "); Pay attention to the print p is lowercase, after every change, want to use javac recompile the
lower case or not

CodePudding user response:

refer to the second floor tianfang response:
System. Out. The println println is all lowercase,

Learn Java, use first IDE
lowercase or the error

CodePudding user response:

refer to the second floor tianfang response:
System. Out. The println println is all lowercase,

Learn Java, use first IDE
lowercase or the error

CodePudding user response:

Me about my writing, in front of the class add a public said public classes, and then your println p to lowercase, and, at the command line run javac compile in the use of Java file to run first

CodePudding user response:

Remove the others said, you have a problem:
Your file named HelloWorld. Java
You write the main class call HelloChina?
In addition, the main class wrote public before the leak
Prev:The JVM
  • Related