Java 2 common sense

Download and install the JDK
 download the official website github
installation fool install JDK, JRE
 path attention problems installing the software can not contain spaces Chinese
path environment variable windows operating system command is executed to search for the path
Why To configure path: hope java development tools (javac.exe java.exe) can be executed in any file path to success

HelloWorld development experience
to write
to create a java file HelloWorld.java
class HelloChina {
 public static void main (String [] args) {
  System.out.println ( "the Hello, World!"); 
 }
}
2.
Compile
javac HelloWorld.java
Run
java HelloChina
Common Problems and Solutions
Source file name does not exist or wrong
current path error
extension hide
In particular, the class file name wrong file name and class name inconsistent to be careful
the next class file is not in the current path or not in the classpath specified path
3. Summary of a program
4. Comment: Comment
Category:
single-line comments: //
multi-line comments: / * * /
documentation comments / ** * /
Role:
 1. procedures be written explanations to enhance their own convenience easy readability others
 2. debug code written
 
Features
 1. single-line and multi-line comments, which is not involved in compiling the content
 2. In other words, the end of the .class file byte code compiled later does not include information commented
 3. Multi-line comments can not be nested use
2.Java API documentation
API: application programming interface language is customary to provide class libraries are called API
API documentation: for the library to provide a similar description of how to use the "Xinhua Dictionary"
3. Good coding style

 Common Java development tools
  Java integrated development environment (IDE)
   JBuilder
   NetBeans
   the Eclipse
   MyEclipse
   IntelliJ IDEA
  2.EditPlus use

Guess you like

Origin www.cnblogs.com/xuezha/p/12075615.html
Recommended