Self-study JAVA, can understand the video tutorial and code, but can’t write it by yourself, what should I do

1. The amount of code is too small, and you see too much and do less, leading to mistakes as soon as you do it.

 

Any nb developer must improve himself in a lot of time and code. If you just watch the video, it will always stay in theory. Many problems can only be discovered through practice.

For example, when you watch the video, you may think that it is too simple to write a program that outputs helloworld, and you can understand it in almost a second, because there is no logic, it is very simple, but when you practice it, you may be

appear

 

1. The file cannot be found. The reason may be that you wrote the wrong file name when compiling with javac in cmd.

 In this case, you can use the dir command to check the files in the current path and you can see from the name whether there are any files for you.

 

 

2. It may appear that your class name and file name are not uniform

 

 

3. Garbled codes may also appear, which can be solved by specifying the encoding with javac -encoding utf-8 test.java.

Of course, there may be many problems with just a few simple lines of code, such as wrong keywords, semicolons not written in English mode, and so on.

In short, in your opinion, it is possible to make mistakes in the simplest problem by yourself, and these things that you seem to be simple and practical, but the problem is that you practice too little. Of course, the premise is that you understand the code. If you don't even understand the code, then let's not talk about the actual operation. If you want to get started, the first is to understand, and the second is to type code. When learning programming, you should not only learn theory. Learning and typing code should account for 4 to 6 points. Maybe most of the novice friends are upside-down.

 

I have been doing java development for eight years. I have a good understanding of the learning methods and techniques of java and how to learn to avoid detours. If you have any questions about learning java, please feel free to ask me, please click blue Color words plus my Java technology qq exchange group . This group has been established for several years. There are many big bosses working in big factories. If you have any questions, you can directly ask in it.

 

2. Questions that are not understood are not answered in a timely manner

 

It is certainly normal to encounter problems on our self-study road, and it is also a common problem for any developer. If a problem is not answered, it will definitely affect the subsequent learning. Let me make an analogy, generic If you do not learn well, it will definitely affect the collections you learn later, and if you do not learn well, it will definitely affect your later upload and download, or the import and export functions of Excel. If the problems that were put on hold in the early stage become more and more accumulated, I feel that I have learned almost the same, but I can't do a basic javaweb project, let alone learn the following framework. When you are studying, you try to solve the problem as much as possible before continuing to learn the later. The most important thing in learning is to understand rather than finish it. Of course, you can also write down the problem in a small book and come to me. I am willing to answer. Here are a lot of problems encountered by novices. Of course, I also recommend that you download a Youdaoyun notebook, and write down the notes you are studying or the solutions to the problems you encounter, so that you can open it directly wherever you go, or record it on your blog. This will also have advantages for you in future interviews. You can show a lot of valuable things by opening your blog directly to the interviewer.

 

Three, the order of learning

 

Of course, for me, a novice is not just learning javase. Even if you finish learning javaweb, you are still a novice. I can't say that you are a junior engineer after learning javaweb. So I will jump out of the basics of Java and talk about the next question. There is a problem with the order of learning. Some classmates ran to learn the front-end before they finished learning javase, or learned the framework when they heard that the framework was good. There is no systematic learning route. Now people on the market tell you that the learning route is basic They are all learning methods that came out in the past few years, but they were taken out after a change, such as learning the front-end basics of jdbc and then javaweb. This is already the previous practice, and the real high efficiency should be to learn how to write general functions in jdbc with reflection in javase, and then learn mybatis. Because the persistence layer framework is encapsulated based on jdbc, but it uses a lot of reflection. If you have learned and contacted in jdbc, it will be very beneficial for you to learn the mybatis framework.

 

Let me sort out the specific learning route for everyone:

Javase------database------jdbc------mybatis------front-end foundation------javaweb------spring------ maven------springboot------reids------springcloud------linux------git.

J avase: Java foundation, since it is the foundation, it is definitely the most important, so when learning is also a place to focus on learning.

Database: Why do you want to learn database, because our web data needs to be persisted to disk for unified management, and the database is undoubtedly the best tool. The current mainstream relational databases are mysql and oracle. I recommend learning mysql first. Why is MySQL less difficult than Oracle, and it has the most application scenarios in China.

 

Once you have learned mysql, you can develop a complete product, and you can learn oracle again.

 

J dbc: The full name in English is Java Database Connectivity, and the Chinese means Java Database Connectivity. Why do you want to learn jdbc? Because we can’t let users write SQL from the page when querying data. Users can’t write it, so we can only give them The code is written, and the corresponding data can be returned every time you click on the page to trigger the execution of sql.

 

M ybatis: persistence framework, of course, there is a persistence framework for applications is very broad, and that is hibernate, is a semi-automatic is a fully automated, and the most widely used in the country is mybatis, in a foreign country with the most is hibernate For specific reasons, you can check it on Baidu. What are the benefits of the persistence framework? If you use the original jdbc for development, you have to manage each connection yourself. The opening and closing of the connection are all operated by developers, and jdbc has no physical mapping. We need to write code to set the value in. , And using the framework, these are all left to the framework to do.

 

 

Front-end basics : Since you are building a website, it must not be the back-end data, so users can't see it, so you need to learn front-end knowledge and display the data on the page. For back-end personnel, the learning stage only needs to learn The front-end foundation is fine. Html, js, css, jquery will do. Of course, you can also learn front-end frameworks customized for back-end personnel, such as layui and easyui. If you still feel that it is not enough, you can learn the front-end dedicated framework. For example, vue element, but the main premise is to learn from the background before learning other things.

 

J avaweb : jsp, servlet. Why do I need to learn jsp if I use html? Because jsp and Java are seamlessly connected. After learning javaweb, you can make a project by yourself, for example, if you want to make a personal website. You can build an educational administration management system for your school.

 

S Pring: background frame. Why use a framework, which can be developed quickly and reduces coupling. Spring's AOP support allows centralized management of some common tasks such as security, transactions, logs, etc., thereby providing better reuse. Spring's ORM and DAO provide good integration with third-party persistence layer frameworks and simplify The underlying database access.

 

M aven: mavne is a tool, its core is pom.xml, this configuration file, pom is project object model in English, which means object management model, that is, the project is also treated as an object to operate. The most intuitive benefit that brings us is the dependency problem. In the past, we needed to download the jar package by ourselves and build it into the project, but with maven, we only need to write the dependency of the jar and it can be automatically downloaded for us.

 

S pringboot: s pringboot is based on maven. The most obvious feature of springboot is that it can be used out of the box, that is, it can be developed directly after constructing a springboot project, without the need to go as we do with a springmvc framework. Configure a large number of xml files. Let us developers focus more on business development.

 

R EDIS: previous mysql, oracle relational database, what is the relationship type, that is one-to-many-many. There are these relationships between tables, so it is called a relational database, and redis is a non-relational database, that is, there is no such relationship between his stored data, and it is stored in a key-value pair list set.

 

S pringcloud : micro-services framework, what is micro-services, that is our traditional service monomer split open, that is, the architecture of a single application by business program is divided into a number of independent runs as a service, micro-services The architecture is actually a distributed architecture, the specifics will not be discussed in detail, because the solutions involved are flexible

 

L inux: Linux applications are usually at the bottom, then we have to learn why the top developers it does, in fact, our main application is on the server, which is the server's system. Of course, the system also has Windows, and the difference between Windows and Linux is that Microsoft solves the problem of Windows server. It is very convenient: others do it for you, but it is not convenient: you have to ask him to officially solve the vulnerabilities if you encounter problems, but Linux is different, it is completely open source, and problems can be solved immediately by themselves, as long as the developers are hard enough to change the kernel.

 

G it: version management tool, corresponding to svn, the biggest difference is that git is a distributed system, and svn is not distributed, because after you enter the enterprise, you will develop collaboratively, that is, several small groups in a project team. Partners develop a project together, so there must be a code management tool to ensure that the different modules you make can be integrated, so git also needs to be learned.

Of course, this learning route is also approximate. I didn't type it out if there were too many details. You can come to me directly.

 You must persevere in learning knowledge. Don’t go fishing for three days and two days on the net. Learning must form a habit. If you study for a few days and play for a few days, you may forget the previous few days. Such learning efficiency and progress are very low.

 

Guess you like

Origin blog.csdn.net/deqing271/article/details/115380006