Home > Back-end >  How to learn Java
How to learn Java

Time:11-29

Followed by specific four articles, it is recommended that you read in sequence, a little long, collection of remember thumb up or comment on ha, ink!

Java engineer study guide

Introductory article

Recently there are a lot of friend to ask me, how Java small white primer, how to arrange study course, every step should be how to get better, originally I thought that before a few articles have been able to solve all the problems, actually otherwise, because before I write articles are standing on the Java back-end global thinking and summarized, and ignored the many small white people's feelings, and a lot of friends will need more basic, more detailed study route,

So, today we to open a new project, respectively according to four articles about Java learning route (introductory article, elementary, intermediate, advanced), the author is going to take this opportunity to recall your own Java learning course, today we are going to speak, how small white students an introduction to Java,

First stated, the article content not to each step in detail how to operate, can only provide general train of thought and direction, to everyone in order to inspire, if really want to step by step guide operation, that at least the thickness of a book,

The method described in this article may not suit everyone, such as incorrect locations,

01 preparatory work

The development environment to build

We tend to skip this step, but now that is geared to the needs of small white tutorial, here, you can mention it, first, you need a computer, then installed JDK and JRE, JDK is provided by the Java development tools, also is some essential jars, JRE is the Java runtime components, we are familiar with the JVM is in there,

After installed the two east east, general to configure the environment variables, or some directory may not be able to be found right,

IDE select and install

IDE refers to local development editor, without it, you can directly to knock the code in the notepad such tools, IDE the biggest advantage is the integration of a large number of tools and functional modules, make you very easily to complete development,

Before everyone in eclipse, but the eclipse is out of fashion, now I recommend you to use intellij idea directly as your first code editor, if is used eclipse classmate, basically can be painless switch,

Intellij idea can be directly on the official website to download, 30 days trial version, if you want a permanent use, the Internet also has some way to drop,

About the jar package

Jar package what is, in fact, the packaging will be a heap of class file format, called it the jar in the Java package, can be directly identify these jars in the compiler, let developers use,

For newcomers, may only need to use the JDK take some of the API, but if you want to refer to external jar package, may encounter some difficulties, for the idea, the import external jar package has two ways, one is to manually import the jar package, one kind is to use maven, the latter will be in Java Web related articles,

Actually not difficult also to manually import the jar package, you need to download the jar package, and then select import the jar package under the corresponding project, said the specific method here is not, because are available online,

02 based several methods of learning Java

Learn basic grammar

Learning a foreign language, the first thing to do is to learn its syntax, I learn Java syntax is the earliest in Runoob, this website allows you to either the grammar of the language to complete the fastest entry, of course, this is equivalent to you through a basic grammar,

To really grasp the Java language, grammar is not enough light to see basis, I contact for the first time in three Java classes, listen to the teacher speak three big features of object-oriented heard a confused, even the way array initialization is not clear, but the content is we need to know, so, in order to learn Java foundation, we also need to see the video or read a book to learn,

Watch video

Video, you can to the geek college or longed for listen to Java foundation course, network class, of course, also can see my share of Java video courses, everyone know, Java classes now very much, basic school things are the same, but they are some course is good, we have the channels can also go to have a look,

See the benefits of the video is that you can receive better knowledge, at the same time, it will cost you more practice, so, sometimes you can also choose to read a book,

Read a book

Reading a book, is not recommended for small white is too complex, such as "Java programming thought" this book, the novice don't see, my personal advice, you just need to look at "introduction to Java to master" this type of book is enough, because this part of the study is just for you to learn at the back of the head, you may have to go back to study the content,

Now on the market introduction to the basics of Java there are so many books that are of variable quality, content homogeneity is serious, I've seen actually not much, also give you a suggestion, you only need to pick one or two books to see, here recommend two of the most simple, "the head first Java" and "Java from entry to the master,"

The blog

To recommend another kind of study way, here is the blog, blog than books, more suitable for a technical point of learning, you can easily find the knowledge on the Internet related principle, implementation method, as well as the code example,

My blog without the basis of interpretation of the special things, if you look at some of the more basic articles, can see to Runoob website, if you have a clear knowledge to learn, believe that the search engine will give you a better answer,

Code practice

In addition, the general Java books or video courses will require you to complete some corresponding exercises, this part you need to use the IDE in the computer to complete,

In the IDE, you can very well familiar with the use of Java language, the realization of the basic code, at the same time to try all kinds of API, and test some language features, such as inheritance, encapsulation, polymorphism, etc.,

In addition, that is a good chance you are familiar with the IDE, because in the company may use the IDE to develop a variety of functions, familiar with good IDE is absolutely good ahead of time,

03 comb necessary knowledge introduction to Java

In a Java introduction stage, you may need to contact to the following this part of knowledge, no matter through which way are you from learning, the content is based around the focus, however, when you learn Java

Basic knowledge of Java

This part is you have to grasp the content, in the introduction stage you need to beat the foundation solid, so that when they study the content behind the can to the next level,

How to making a solid foundation, the best thing to do is to put the book on the IDE or every example implementation on the video again, of course, sometimes you can also write some interesting examples,

Basic data type 1

For example, int, double, char, and the wrapper classes,

Familiar with the use of basic data types, to understand each type of the number of bytes, and the mutual transformation between them and the wrapper classes,

2 flow control

The for loop, for example, if the else, while loop, etc.

If it is learned c language students, this section can be skipped,

The use of 3 type String String

String type is important types in Java, it is not a basic data types, but popular, familiar with the API, and practice a String to begin your study of String, a

4 array

What array initialization method, two-dimensional array should be how to write, use an array as method parameters and how to deal with?

5 classes and objects

Java in the two most important concepts: classes and objects, what are they used for? What is the difference and contact, please practice them in your code,

The Java core technology

For this part, I believe that a lot of small white can only understand their basic use method, but does not understand its behind some of the principles: why are there these differences interfaces and abstract classes, for example, what is the significance of polymorphism, why do you want to have a reflection,

Beginners in learning this part, you just need to know how to use is ok, of course, you'd better put all of these features to realize again, to deepen our impression,

Why have these features, these features what is the principle behind, is not we now discuss the content, the content we will be in primary and secondary article tells, because, to understand these principles, you have to understand the JVM, understand the basis of concurrent technology, knowledge network, and even more, obviously, this isn't what you can do,

Interface and abstract class 1

Write some interface, at the same time to write some implementation class to implement these interfaces, and learn about why we need interface, why subclasses need to implement the method in the interface,

Similarly, to achieve some abstract class, then, take a look at what's the difference between it and the interface,

2 inheritance, encapsulation and polymorphism

How to understand the inheritance, what is the relationship between parents and children,

Packaging is a kind of protection code, what are the ways to realize encapsulation,

Polymorphism generally divided into overload and rewrite, respectively, how to use them?

3 the exception handling

In Java exception handling is mainly used to capture and handle errors, please write some try catch block to catch errors,

4 collection class

Collection class is that we often need to deal with things, List, Map, Set, and so on, go to familiar with the API, and then write some test examples,

5 I/o input stream and output stream

IO input stream and output stream can manipulate files, such as network data content, how to do so in Java code complex operations, really only need a few simple API,

6 multithreaded

In order to make the system resources reasonable allocation and scheduling, we need a multi-threaded, multithreading program interesting, also can bring a lot of problems, using Thread and related API, try these fun things,

Optional content:

1 reflex (introduction to understand, is not must)

2 enumerated type and generic (introduction to understand, is not must)

3 network communication (know basic socket to use, need to network based)

Understanding basic JDBC database operations (can, requires a database based)

04 summary

To sum up, for a Java small white, introduction to Java can be divided into the steps:

1 first set for Java development environment through some websites such as Runoob 2 familiar with the basic syntax of Java 3 by reading a book to see the way to be familiar with the basic knowledge of Java, such as video by code practice deepen understanding 4 by reading a book to see the preliminary understanding Java core technologies, such as video through code practice deepen understanding,
This paper is to provide you a learning mentality, and recommend some learning methods, if you can follow the steps so that to learn, and cooperate with some suitable for your own learning method to complete the study plan, believe that you can complete the Java introduction,

Java engineer study guide

Primary article

Recently there are a lot of friend to ask me, how Java small white primer, how to arrange study course, every step should be how to get better, originally I thought that before a few articles have been able to solve all the problems, actually otherwise, because before I write articles are standing on the Java back-end global thinking and summarized, and ignored the many small white people's feelings, and a lot of friends will need more basic, more detailed study route,

So, today we to open a new project, respectively according to four articles about Java learning route (introductory article, elementary, intermediate, advanced), the author is going to take this opportunity to recall your own Java learning course, today we are going to speak, how small white students an introduction to Java,

First stated, the article content not to each step in detail how to operate, can only provide general train of thought and direction, to everyone in order to inspire, if really want to step by step guide operation, that at least the thickness of a book,

The method described in this article may not suit everyone, such as incorrect locations,

nullnullnullnullnullnullnull
  • Related