1. Notepad to develop a Java program
Write source program source program with. Java as the suffix name
compiled Javac the resulting file with a. class suffix name
run Java to run the. class file generated after compilation
2.java Program Framework
Public class hello{
Public static void Main (string[] args) {
//Notes
System.out.println ("helloworld!");
}
}
3. Escape character
newline \ n space \ t
Note: Escape characters can only be used in strings!
4. Notes
/ * * * multi-line Comment
//single-line comment
5. Coding Specifications
only one statement is written on a single line.
note Hierarchy, indentation
6. Note the point:
class name can not be random (meaningful, first letter capital)
Java is case sensitive, note punctuation in English
";" is a must.
"" " is a must.
the output string must be quoted in quotation marks, and must be in English
Java Jen Baby Java notes