What do you pay attention to Java beginner?
Li Qinglin is transferred from http://www.javajia.com
This article is selected from: Open System World - CCID NET
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.
Java environment building
To run the Java program, you must install JDK. JDK is the core of the entire Java, including Java compiler, JVM, a large number of Java tools, and Java foundation APIs. JDK can be downloaded from http://java.sun.com, with a version 1.4 version 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 settings:
SET PATH = Your_Install_ DIR / BIN; C: / Windows; C: / Windows / Command
Set classpath =.; Your_install_dir / lib / Tools.jar2. For the Linux platform to edit the / etc / profile file:
Java_Home = Your_Install_dir / JDK / J2SDK
ClassPath = $ java_home / lib / Tools.jar: $ java_home / lib / td.jar: $ java_home / jr
-e / lib / rt.jar :.
PATH = $ PATH: $ java_home / bin
Export Path Ps1 User Logname Mail Hostname HistSize Histfilesize
Inputrc Java_Home ClassPath Resin_HOME Finally, enter Java on the terminal to see 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 Documentation, this is the JDK online help document, is the most useful and most important learning reference document, should look more. Start writing your own code
Now there is an environment, you should write a simple code for testing. Start from the classic "Hello Word". 1. First 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.java3. carried out:
[stone @ Coremsg Work] $ JAVA Hello
Hello Word! Success! 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. Through this level of learning can deepen the application of Java's understanding and underlying principle, while you can fully understand the entire system of Java. At this stage, you should focus on learning the characteristics of Java's object-oriented programming languages, such as inheritance, constructors, abstraction, interface, polymorphism, overload, coverage, Java's exception handling mechanism, etc., to have the above concept Very clear understanding. The purpose of doing this is to let yourself apply these technologies into practice for reasonable programming (for example, you will consider a class to design, etc.). This requires the application and study in a large number of practices. This is also the suggestion that many friends gave me.
Learn more