Introduction to Java Novice

Source: Internet
Author: User

Java There are always thousands of benefits to choose from, but these can be found by flipping through a book or walking around the internet. In this article, I have learned some of my own knowledge of Java and the process of writing, for Java training

Beginners to make a reference.

I study Java in the process mainly around the following aspects to learn:

  1. always remind yourself that Java is an OOP language Tool, not just coding, in order to master and use Javain general.

  2. in the learning process, it is better to understand the underlying mechanism of Java , rather than just stay on the surface, not the example of transcription run the results can be. Be aware that even for a simple example you have to be patient with your mind, debug, and change.

  3. in the process of learning must be done, write code, instead of holding a book to look at the line. A lot of things and experience must be done on their own to truly belong to themselves, it is best to participate in some practical projects.

  4. after a certain period of learning, you begin to want to do something with what you have learned. At this point you should start to learn some more and more complex knowledge, such as the construction of the Java EE Platform,EJB development and so on. For this part, I suggest that it is better to find a thinner book first to understand a general understanding, in the heart of the overall knowledge, more technical terminology to do a preliminary grasp. I think this is a good time to look at the "Java EE Technology Practice", which allows you to understand the various technologies and frameworks included in the Java EE , and provides many practical examples to deepen the overall understanding of the Java EE .

The interest and determination to learn Java play a key role. With this foundation in place, I began to learn JavaStep by step.

  Building a Java environment

To run a Java program, you must install the JDK. The JDK is the core of the entire Java , including the Java compiler, theJVM, a large number of Java Tools, and the Java base API .

You can download the JDKfrom http://Java.sun.com with the 1.4 version and the 1.31 version. In my learning environment, first of all, the 1.31 version is used.

Unzip the installation. Then, make the environment settings.

  1. The following settings are set for the Windows platform:

  Set Path=your_install_dir\bin; C:\Windows; C:\Windows\Command

  Set classpath=.; Your_install_dir\lib\tools.jar

  2. to edit the /etc/profile file for the Linux platform:

  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 userlogname MAIL HOSTNAME histsize histfilesize

  INPUTRC Java_home Classpathresin_home

Finally, enter Java on the terminal to see if you can find this command, if you find the installation is successful.

Here are some important commands for the JDK :

  The Java Execution tool is the command that starts the JVM ( virtual machine ) and executes the class (bytecode) file ;

  javac compiler, generates . class files from . java files ;

  jar Java compression Packaging tool ;

  Javadoc Document Builder.

Finally, JDK documentation, which is the JDK 's online help document, is the most useful and important learning reference document and should be viewed more.

Start writing your own code

Now that the environment is there, you should write a simple code to test it. Or start with the classic "Hello word" .

  1. first write a code with the editor ( I'm using the VI of Linux ):

  [Email protected] work]$ Vihello.java

  public class hello{

  public static Voidmain (String []ARGC) {

  System.out.println ("helloword!");

  }

  }

  2. Compiling:

  [Email protected] work]$ Javachello.java

  3. implementation:

  [Email protected] work]$ Javahello

  Hello word!

It worked ! This is my first Java program. Since then I know that I have started to enter the world of Java , and then rely on their own efforts. In this process, I think there are a few points to note.

learning a new language, reference books are inseparable. My advice is to start looking for a shorter introductory book to learn the simplest and most basic things, including learning Java syntax. At the same time, to a simplest program should also be more debugging, think about what will happen if you change the result ? Why do I have to write that ? Think more about these problems and then go to work, and you'll get more out of it. It is useful to think over and over again. In addition, you should see more online Help for jdk at this stage, as much as possible with the Java Basic class library API provided by the JDK .

After a certain basis, to write some simple procedures, you can start to read the "thinkingin Java" this book. It introduces the syntax of Java , Object-oriented feature, core class library and so on. This level of learning can deepen the understanding of Java and the use of the underlying principles, but also a complete understanding of the entire Java system. At this stage, we should focus on the characteristics of Java 's object-oriented programming language, such as inheritance, constructors, abstract classes, interfaces, methods polymorphism, overloading, overwriting,Java exception handling mechanism, to the above concepts have a very clear understanding. The purpose of this is to allow yourself to apply these techniques to practice for reasonable programming ( For example, you would consider whether a class is designed with abstraction or interface ). This requires that a great deal of practice should be applied and studied. This is also a lot of friends to give me advice.

Learn More

If you want to use Java to accomplish a variety of more powerful tasks, then you need to learn more than the language of things.

  1.Java Web Programming

For Java Web Programming, you should and must be familiar with and master the HTTP protocol, you can refer to Stevens 's "TCP/IP detailed" third volume. Java Servlet technology provides the ability to generate dynamic Web page content, which is one of the most basic features in your Java project, so you must learn. Through this stage of learning should master servlet/jsp Web programming.

  2. The study of the Java EE

  The Java EE contains too many techniques. If you want to sit at the table and hold a pile of books to study, the effect is not big. I suggest that at the beginning of this stage of learning, you can follow the following steps to do, the general idea is " overall grasp, conquer. "

   understand the meaning of technical terminology in the Java EE .

My feeling is that the Java EE Standard involves a lot of technology, if the first one to learn the words are unrealistic, but also ineffective. My advice is to have a general understanding of the technology, such as EJB,javaidl,JTA , etc. You may not know how to write an EJB, but you know what EJBis, what it can do, and when you have such a concept, it will be much quicker to learn it purposefully. I would like to repeat - I have to do it in practice.

   Learn about the design patterns in the Java EE , which will help you grasp the Java EE as a whole.

  The MVC development model proves to be one of the effective methods of processing. It can decouple data access and data performance. You can develop a scalable, scalable controller to maintain the entire process. Through this level of learning, when you face a project, you should first grasp its overall architecture design, and decide to adopt the Java EE standard of which technologies.

   Learn more about the typical case of the Java EE platform and deepen the concept and understanding of this technology.

Usually can pay more attention to this aspect, familiar with some typical cases, analyze why it should use that time ? What does that do to you ? Then contact your side of the project can be used as a reference.

   Learn the various technologies under the Java EE .

In the first few stages of Java EE training

After learning, you can set up a Java EE platform to start specific learning each technology. You can participate in the company's related projects to learn, you can also build a platform for learning. At this time should find some relevant books to learn step-by-step, there is no shortcut to go. If you are not satisfied with these, you should also learn more in depth

Uml

, design patterns, and so on.



Introduction to Java Novice

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.