Java has always had its best benefits to choose it, but these casually overlooks or visit the answer on the Internet. In this article, the author writes some of the body of Java to learn Java, and the scholars are given a reference. I am studying in the process of learning Java to learn from the following aspects: 1. Always remind yourself Java is an OOP language tool, not just coding, only in this way will grasp and use Java. 2. In the process of learning, it is best to understand the underlying mechanism of Java instead of staying in the surface, not the example of the copy of the book. It should be noted that even if there is a simple example, there must be patience, debug, and change. 3. Be sure to do it during the process of learning, write code, not to hold a book to see it. Many things and experiences must do their own to really belong to themselves, it is best to participate in some actual projects. 4. After learning a certain stage, what you have begun to do what you have learned. At this time, you should start learning some more, more complicated knowledge, such as the construction of the J2EE platform, EJB development, etc. For this part, I suggest that it is best to find a thin book to understand a matter, there is a general understanding in my heart, and a preliminary master of more technical terms. I think this stage look at "J2EE technology practice" is very good, it allows you to understand the various techniques and frames included in J2EE, while providing a lot of practical examples to deepen the overall understanding of J2EE. Learning Java's interest and determination has played a key role. After having the above foundation, I started learning Java step by step. The Java environment is built to run the Java program, and JDK must be installed. JDK is the core of the entire Java, including Java compiler, JVM, a large number of Java tools, and Java foundation APIs. Can
Http://java.sun.com/ Download JDK, there are version 1.4 and version 1.31. In my study environment, I use the 1.31 version. Unzip installation. Then, the environment is set. 1. For the Windows platform, you should do the following: SET PATH = Your_Install_ Dir / Bin; C: / Windows; C: / Windows / CommandSet ClassPath =. Your_Install_dir / lib / Tools.jar 2. For the Linux platform To edit / etc / profile Document: java_home = Your_install_dir / jdk / j2sdkclasspath = $ java_home / lib / Tools.jar: $ java_home / lib / td.jar: $ java_home / jr -e / lib / rt.jar: .path = $ PATH: $ java_home / BINEXPORT PATH PS1 User Lognplace Mail Hostname Histsize Histfilesize InputRC Java_Home ClassPath Resin_HOME Finally, enter Java on the terminal Can not find this command, if it can be found, it is successful. Let's introduce a few important commands of JDK: ◆ Java execution tool is a command to start JVM (virtual machine) and execute the class (Byte code) file; ◆ Javac compiler, generated .class file by .java file; ◆ jar Java compressed packaging tool; ◆ Javadoc document generator. Finally, JDK Document. TION, this is a JDK online help document, which is the most useful and most important learning reference document, should look more. Start writing your own code is now available, you should write a simple code for testing. Start from the classic "Hello Word". 1. Write a code with the editor (I use Linux VI): [Stone @ Coremsg Work] $ VI Hello.java Public Class Hello {Public Static Void Main (String [] argc) {system.out.println (" Hello Word! ");}} 2. Compile: [Stone @ Coremsg Work] $ JAVAC Hello.java 3. Execute: [Stone @ Coremsg Work] $ JAVA Hello Hello Word! Successful! This is my first Java program. Since then, I know that I have begun to walk into the world of Java, and I will rely on my own efforts. In this process, the author thinks there is a need to pay attention. Learn a new language, the reference book is inseparable. My suggestion is to start finding a shorter entry book to learn the simplest, most basic things, including learning Java grammar. At the same time, it should be more debugged for a simplest procedure. Think about what results will occur if you change? Why do you have to write? Think more about these problems and then do it, you will make you more harvest. This is useful to think repeatedly. In addition, at this stage, you should also look at JDK online help, try to grasp the Java basic class library API provided by JDK. After a certain basis, you can write some simple programs, you can start watching "Thinking In Java" book. It introduces the syntax of Java, object-oriented features, core class libraries, etc.