preface
If you want to teach yourself Java and read this article carefully, you will save yourself at least a year of missteps in your career.
This article will be updated continuously.
The original
On CSDN, some students often ask me questions about “how to learn Java by myself” and “Is it feasible to change my career to Java?” since I also learned Java by myself in college, I can understand the pain and confusion of these students.
Before writing this article, I read some articles about Java self-study online, many of which I was not satisfied with, and some of which even made me angry. They were either talking from an existing perspective or just making things up.
Many articles have an old problem: completely did not think from the perspective of xiaobai, too much content, what micro services, architecture, big data have come, this is not the stage of self-study to see things, xiaobai read these articles, will only look more and more meng, can not start.
In fact, I wrote a “zero-based Java self-study road” in 18 years, but now, the article was too simple, just provided a train of thought, but a lot of content did not write.
Now three years have passed, I have some new thoughts on this topic, and in order to save the majority of students who are suffering from difficulties, SO I decided to write a new self-study course.
To introduce myself
Before writing this article, it is necessary to introduce myself, so that we can better compare and reference.
In my junior year of college, I began to study Java by myself and learned it by myself for one year. However, I majored in computer science, so I have the foundation of C language. However, I took many detours in my self-study and spent a lot of time learning many things that I could not use at the back: Oracle, Hibernate, Struct2, JBPM, etc., and lack of guidance from experienced people, so it’s easy to miss the point, so a lot of time is wasted.
But it wasn’t as insideas it is now, so I got a job right after the fall of my senior year.
Industry status quo
Programmer status
Due to the high salary of programmers, many people from other majors have flooded into the programmer industry in recent years, accelerating the industry’s internal volume, but according to statistics from a recruitment website, the current demand for programmers is far higher than the industry average. So, the programmer situation is pretty good for me, at least for a few years.
Present situation of Java
In recent years, the rapid rise of languages like Go and Python has challenged The position of Java, but Java is undoubtedly still the most in demand in the Internet industry.
Many big companies: Ali, Meituan, Kuaishou, Pinduoduo, Didi, NetEase, etc., all use Java as the main language of the company. Some big companies: Tencent, Baidu, Byte, etc., although they use other languages as the main language, there are more or less some Java posts.
Therefore, the current situation and future of Java, I think are relatively good. More positions also represent more opportunities, which is friendly to newcomers. Therefore, I personally recommend newcomers to learn Java.
You should know before you teach yourself
Be prepared for self-study to be a lonesome and lengthy process, and be prepared to give up almost all entertainment, including Chinese New Year, if you want to get in the door. If you just take the attitude of three days to catch fish and two days to dry the net, then I suggest you give up.
But if you stick with it, I’m sure it will pay off. I’m an example. I’ve taken so many wrong turns, and there’s no reason why you should be any worse off than I was.
Teach yourself the estimation cycle
The period of self-study I set a reference time for you: 6 months, with an average of 6-8 hours a day, about 1200 hours in total. Roughly arranged:
1. Three months of basic knowledge learning and strengthening.
2. Repeated practice in SSM project for 2 months, while reviewing and consolidating the previous basic knowledge.
3, a month to prepare for the interview questions, looking at the interview questions will actually increase their professional knowledge, and may be more than you think, it is not an exaggeration to say that in the past few years, I learned from the interview questions may be more knowledge than the work.
Self-study Tutorial acquisition
Recommended reading: How did I teach myself how to earn meituan $80 million a year
Very important advice
1, Einstein’s formula for success: success = efficiency * time, self-study is the same, need to combine work and rest, do not get too tired, otherwise the efficiency drops, spend more time is useless.
2. Self-study is a long process. Step by step and be patient.
3, write down your learning process, when you find that the accumulated more and more, the heart will have a small sense of achievement, which will improve your motivation to learn.
4, focus on the study of key knowledge, the introduction of this article basically covers the current content you should learn, most of the not mentioned is not so important, if you can not judge whether it is important, you can leave a message below this article, I will answer one by one, as for some of what: K8s, Hadoop, hbase, etc., don’t even look at it, it’s a waste of time for you right now.
Make good use of the search engine, what problems on Baidu, novice baidu can solve most of the problems.
6. Watch videos instead of reading books. Any book you read at this stage, including the famous “Java Programming Ideas”, is a waste of time.
7, watch the video to follow the knock again or even more times, if you only watch the video without knocking, you will find that in the end, nothing will learn.
8. Some historical videos in the video can be simply understood to save some time.
9, about the selection of video tutorials: choose nearly 2~3 years of tutorials, the lecturer let himself listen to comfortable, click the high video level is basically the same.
10, do not understand the knowledge can be repeated, such as the same knowledge point has two sets of tutorials, after reading the first did not fully understand, you can look at the second, deepen the impression, can also check some information to help understand.
Self-study knowledge
1, the Java SE
1.1. Java Basics
Basic concepts/syntax: Object-oriented (inheritance, encapsulation, polymorphism) basics, packages, classes, interfaces, methods, objects, properties, first Java program.
Data types: 1) Basic data types: byte, short, int, long, float, double, char, Boolean; 2) Reference data types
Variable types: local variables, instance variables (member variables), class variables (static variables)
Modifiers: public, private, do not write, protected, static, final, abstract, synchronized, volatile
1) Arithmetic operators: +, -, *, /, %, ++, –; 2) Relational operators: ==,! =, >, <, >=, <=; 3) logical operators, &&, | |,! ; 4) Assignment operators: =, +=, -=, *=, /=; 5) Conditional operator: Object x = (expression)? Value if true: value if false;
Loop structure: for loop, while loop, do… The while loop
Conditional statement: if… Else, if… else if… else
Exception handling: Try… catch… Finally, throws, and throws
Strings: String, StringBuilder, StringBuffer
Others: Switch case, array, date and time, enumeration, DEBUG using IDE
1.2, collections,
Map: HashMap (most important), ConcurrentHashMap, TreeMap, Hashtable
List: ArrayList (most important), LinkedList
Set: HashSet (most important), TreeSet
1.3. Multi-threading
Thread life cycle
There are three ways to create threads: inheriting threads and implementing Runnable; Implement Callable
ThreadPoolExecutor (thread pool)
Lock: synchronized and Lock
1.4, I/O streams
1.5. Network programming
1.6, reflecting
1.7, generics
1.8, annotations,
Summary:
1. This stage is very important and it is recommended to read at least two different tutorials. Since every teacher’s point of view has some one-sidedness, when in doubt, you can look at the understanding of other teachers, and you may be able to figure it out.
2, the first time will be slower, the second time will be faster, have mastered the knowledge can quickly take over.
3, there are questions of knowledge to read several times, you can also watch blog online to help understand, really do not understand can be written down, after learning a certain degree may understand.
4. For key knowledge, you can take notes to deepen your understanding and facilitate your subsequent review.
Java foundation, collection, multithreading is the core of the core.
Chapter objective: Master all Java core basic knowledge listed in this chapter, and be able to write Java programs skillfully.
2, SQL
2.1, SQL
1) Understand basic concepts; 2) Master the use of DML statements: SELECT, UPDATE, INSERT and DELETE; 3) Master the use of DDL statements: some SQL statements used when operating tables. For example, CREATE, ALTER, and DROP.
2.2, JDBC
Master basic usage.
2.3, MySQL,
Master basic usage.
Chapter Objective: Master the basic use of SQL statements, understand the basic use of JDBC and MySQL.
3, Java Web
3.1. Front-end content
HTML, CSS, JS (JavaScript), Ajax, jQuery
3.2. Back-end content
Servlet, JSP, Request, Response, HTTP, Session, Cookie, Filter, Listener
Java Web priority-related technologies are less directly used on the current Java back end, and may not even be used by Java programmers in recent years. Most of them are encapsulated and replaced by the SSM framework in the next section, but it is necessary for beginners to study this chapter carefully, so that they can understand and follow the changes.
Chapter objective: to understand the knowledge involved in this chapter, so that they can understand, can follow the correction. Pay a little more attention to servlets, which are the most important part of this chapter.
4. Common tools
4.1, Tomcat
Web application server.
4.2, Maven
Project build management, understood simply as a tool for importing Jar dependencies.
4.3, Git
A distributed version control system is simply a code management tool.
Chapter objective: You need to know what tools are available, and then learn the basics of how to use them.
5. Core framework
5.1, Spring
1) Master basic usage; 2) Master the core concepts, and focus on the knowledge points: IoC (control flip), DI (dependency injection), AOP (section-oriented programming), transaction control.
5.2, for SpringMVC
1) Master basic usage; 2) Master the core concepts, focusing on the knowledge points: MVC architecture, various annotations in Controller, and the flow of an HTTP request.
5.3, MyBatis
1) Master basic usage; 2) Master the core concepts, and pay special attention to the knowledge points: SQL syntax of XML file force, interface and SQL mapping.
5.4, Spring the Boot
Master basic usage.
Chapter Objective: To understand the basic use of SSM framework. It is not necessary to have a complete understanding at this stage, but to deepen my understanding of SSM through practical examples in the actual project.
6. Actual project combat
Prepare 2~3 actual combat projects, apply the knowledge points learned before, make a real project (website). Study projects must use the SSM framework to deepen their understanding of SSM. The projects you did at this stage, which will be your “project experience” on your resume, need to be typed again.
Objective: Connect the previous knowledge, master the complete process of a Web project, deepen the understanding of the previous knowledge through the project, especially the SSM framework knowledge.
7. Interview preparation
If you are already familiar with the Java basics above, then you can also be familiar with building a simple SSM project. I suggest you spend more time on preparing for an interview than many people think. Meanwhile, in the process of reading the interview questions, I can deepen my cognition of the previous knowledge.
7.1. Key contents
-
Java basic high-frequency interview questions
-
HashMap
-
Synchronized, synchronized, synchronized
-
MySQL > index lock ()
-
Spring/SpringMVC/MyBatis
-
SSM actual combat project
This module corresponds to the knowledge we have learned above, but it is difficult to meet the current interview requirements only by using it. Therefore, it is necessary to strengthen the interview based on these knowledge. For specific topics, please refer to my interview series.
7.2. Advanced content ****
-
JVM
-
Redis
-
Kafka
-
Zookeeper
-
Dubbo
-
Algorithms: common algorithms, dichotomy, sorting, etc., can be used to refer to the title of the offer
-
Design pattern: You can mainly look at the singleton pattern
You may be wondering why you need to prepare interview questions for all the points listed above. The reason why the advanced part is added is mainly to deal with the phenomenon of more and more serious volume in the current Internet industry. These knowledge points are the high frequency examination points of the current Java interview, but like the basic knowledge in front, it is basically impossible for beginners to systematically learn these knowledge at the current stage. So a good way to do this is to look at the hf interview questions directly and then write down the HF interview questions with understanding.
Chapter objective: memorize the high-frequency interview questions of each knowledge point in mind, try to understand, can not understand the first hard back.
** route problem can refer to: Ali growth study notes **
Interview questions can be referred to my article:Byte Java interview questions library
Q&A
1. How to deal with the knowledge I don’t understand during self-study?
Answer: Baidu/Google to find the answer, the basic problems encountered by beginners can be found on Baidu, use search engines, exercise their ability to solve problems, this ability will run through your entire programmer career.
2. What degree can ordinary people achieve after self-study according to this article?
A: If you’ve really worked hard and put in more than 1,000 hours to follow the path of this article, then I’m sure you won’t have a problem finding a job.
3, see someone on the Internet to learn 6 months into BAT?
A: Is it possible to enter BAT for 6 months by self-study? I believe there is. Much? I believe it’s a needle in a haystack.
For this topic, most of it is false, more is some people/agencies used for advertising, read the content of the article 99% to you pay to add groups or buy information.
4. Self-study or training institution?
A: To be honest, the training institution is definitely easier than self-study. At least the training institution will help you set the direction. Time is a programmer’s biggest pain point;
I can only help you analyze, you can choose according to their own situation.
5. Does the algorithm matter?
A: For students who study independently on the basis of 0, the status of the algorithm can be slightly put behind a little, the current goal is to lay a good foundation of Java, can write Java code.
6. Should I learn C first?
A: To be honest, I personally don’t recommend it, although C is certainly important, but I think if I had the time, I would have better solidify the Java foundation.
7, junior high school/high school/technical secondary school education can self-study Java?
A: There are probably a lot of people/organizations on the Internet that say degree is not important balabala. But to be responsible, educational background is still very important. I do not recommend these students to learn Java by themselves, because it is really difficult. Even if they learn Java, it will be difficult.
For now, at least an associate’s degree, preferably a bachelor’s degree, is recommended, unless you’re really desperate.
8. Is it feasible to learn Java by yourself when you are older?
Answer: be like record of formal schooling, old age is also a problem in this industry, if have a job now, I suggest can use spare time to learn to see first, but do not resign easily self-study, risk is very big.
9. Do you learn faster by reading books or watching videos?
A: Video. The small white of self-study stage reads a book efficiency is very low, basically can’t see bottom, do not recommend to read a book, can follow up study almost, the book that watch an introduction is auxiliary. Beginner stage mainly watch video, and then auxiliary read some online entry blog.
Why can’t I read a book? I sometimes feel impetuous after watching the video in the morning. Can’t I go to the classroom in the afternoon to read a book?
Answer: because this article is mainly according to the most people learn to write, so normal novice will recommend watching video, but if the video sometimes see not bottom go to, want to try reading a book, I think it’s ok to, but if reading after watching it, that is not appropriate, don’t continue to adhere to, or watching video.
Reading, “Java programming ideas” I certainly do not recommend, this book I read at that time, the effect is not good, do not recommend.
At present, it seems that for beginners, the evaluation is better: “Java core technology · volume I basic knowledge”, this book I have not read, but I see that there are several students who are learning by themselves recommended to see, and then its own evaluation is also good, so want to read the classmate suggested can try this book.
11, there are many freshmen do not understand?
Answer: freshman see don’t understand, I feel is normal, also don’t need urgent, because you place of time point still very early, as long as seize the time now, according to the route of this article go to study, arrive big three should go to school almost, behind still have time to learn advanced knowledge. When you graduate later, you will find that you have a great advantage.
A lot of things don’t understand, there are a lot of words after reading forget, don’t know what the specific meaning is, do more and more meng?
Answer: this is the beginner normal will encounter, do not need to be very hurried, there is no shortcut, is to see more, more knock, more practice, over time with more, remember.
Recommended reading
What exactly is Project Pegasus? Tens of thousands of programmers are fascinated by it
Enter big factory also this matter, work after 2 to 3 years enter big factory operation guide
After watching three things
If you find this article helpful, I’d like to invite you to do three small favors for me:
Like, forward, have your “like and comment”, is the motivation of my creation.
Follow the public account “Java Doudi” to share original knowledge from time to time.
Also look forward to the follow-up article ing🚀