summary:
1, and tell you how to develop a JAVA program
-
The first step : the first to write our code, tools that notepad ++ (code: designated ANSI encoding, language: select JAVA)
-
Step two : we want to use our JDK installed (in the bin directory: javac.exe) compile, compiled by the formation of the end of the .class suffix of a file with the same name
-
The third step : we execute our JDK installed (in the bin directory: java.exe), were running our first HelloWorld applet
the HelloWorld class {public
public static void main (String [] args) {
System.out.println ( "Java, Hello!");
}
}
compiler: javac HelloWorld.java
explained: java HelloWorld
2, when we write a small program to pay attention to some problems:
- We must pay attention to the spelling of the word, for example, the main method (this is wrong: mian)
- Note that writing code, pay attention to the brackets are paired children appear
- Do not write any Chinese symbols in the code
- There is a problem it does not matter, we must learn to view the error (small partners to find the problem in accordance with the line number prompt, read to your error message)