2021-03-31 21 Java core technologies that Java development must master!

The purpose of writing this article is to summarize some of my experiences in using java for so many years, hoping to give you some experience, so that everyone can learn and use Java better.

The main content of this introduction is the part related to J2SE. In addition, I will introduce some J2EE-related and various framework-related contents in Java in the future.

After so many years of Java development and combined with some experience in interviewing Java developers, I think that the main thing about J2SE is to master the following content.

 

1. JVM related

For those who are new to Java, the knowledge of JVM does not necessarily need to be deeply understood. Some simple understanding of the concepts in this is enough.

However, for a senior developer with more than 3 years of Java experience, it is almost unacceptable not to know the JVM.

JVM is the basis of java operation, it is hard to believe that people who don't know anything about JVM can fully understand the java language.

When I was interviewing developers with more than 3 years of Java experience, JVM was almost a must ask question.

Of course, JVM is not the only interview question that determines technical ability, but it can prove the level of java development ability.

In the JVM category, I think the knowledge that needs to be mastered is:

JVM memory model and structure

GC principle, performance tuning

Tuning: Thread Dump, analysis of memory structure

class binary bytecode structure, class loader system, class loading process, instance creation process

Method execution process

New features provided by major versions of Java (need to understand briefly)

If you want to learn Java, I will share some Java learning materials with you. You don’t have to waste time searching everywhere. I have compiled all the materials from Java entry to proficiency. These materials are all made by me. The latest Java learning routes compiled in the year, Java written test questions, Java interview questions, Java zero-based to proficient video courses, Java development tools, Java practice projects, Java e-books, Java study notes, PDF document tutorials, Java programmers’ experience, Java job resume templates, etc. These materials will definitely help you learn Java in the future. It is a must for every Java beginner. Please enter my Java technology qq exchange group to download by yourself . All the materials are in the group. In the file, you need to communicate and learn more with you when you go in.

2. Java operation

This one may appear very simple. Who knows how to run a java program?

But in many cases, we only execute java programs through IDE, how does the underlying IDE execute java programs? Many people do not understand.

This knowledge point is the most basic java developer needs to master. The first one is definitely to teach you how to execute java programs on the command line, but once many people have learned java and used the IDE, they will forget this. Up.

Why is it important to know this? After knowing the purest startup method of java, you can analyze how many directories are started at that time, what is the name of the execution, what are the parameters, whether there is any missing, etc. when there is a problem with the startup.

This is conducive to your real development to solve those weird and possible environment-related problems.

The knowledge that needs to be mastered here are:

javac compiles java files into class files

How to use the java command, how to start the java class with package on the command line

The various paths involved in the java program (classpath, java.library.path, the main directory where java runs, etc.)

 

3. Data Type

There is not much to say about this, it is nothing more than the mastery of basic types and object types in Java.

You can learn more about how to automatically convert the JDK, including boxing and unboxing, and you should also pay attention to avoiding the judgment of type equality after boxing.

Main knowledge points:

Basic types: int, long, float, double, boolean. . .

Corresponding object type: conversion from Integer and other types to basic types, boxing and unboxing

Object type: equals, hashcode

Characteristics of String type

 

4. Objects and Examples

In this regard, developers need to understand the concept of class and instance and the difference between them, which is a foundation of Java's object-oriented features.

The main knowledge points are:

The concept of Class and Instance

Instance creation process:

No inheritance: allocate memory space, initialize variables, call constructor

Inheritance: handle static actions, allocate memory space, define variables as initial values, from base class -> subclass, handle initialization at definition, execute construction method

Points to note:

Static properties, etc. are initialized from the base class -> subclass

Features related to the default no-argument construction method

 

5. Access Control

This is also a foundation of the Java encapsulation feature. What needs to be mastered is: public protected default private modification of class, method, and field.

If you want to learn Java, I will share some Java learning materials with you. You don’t have to waste time searching everywhere. I have compiled all the materials from Java entry to proficiency. These materials are all made by me. The latest Java learning routes compiled in the year, Java written test questions, Java interview questions, Java zero-based to proficient video courses, Java development tools, Java practice projects, Java e-books, Java study notes, PDF document tutorials, Java programmers’ experience, Java job resume templates, etc. These materials will definitely help you learn Java in the future. It is a must for every Java beginner. Please enter my Java technology qq exchange group to download by yourself . All the materials are in the group. In the file, you need to communicate and learn more with you when you go in.

6. Process Control

The basics of Java flow control, although some syntax is not necessarily very common, but you need to understand and use them where appropriate.

Need to master: if, switch, loop, for, while and other flow control grammar.

 

7. The concept of object-oriented programming

This is a core concept of java, which needs to be mastered for any java developer.

Many features or knowledge points in Java are related to the concept of object-oriented programming in Java.

In my understanding, a good developer not only needs to understand these features (knowledge points) themselves.

It is also necessary to know how these objects are reflected in the concept of object-oriented programming in java, which is more conducive for developers to master the development language of java and other object-oriented programming languages.

Here is just a brief list, the main knowledge points include :

Three object-oriented features: encapsulation, inheritance, polymorphism;

Their respective definition concepts, what characteristics are reflected, and their respective usage scenarios

The concept of static multiple dispatch and dynamic single dispatch

The concept and use of overloading

Inheritance: Multi-implementation of interfaces, single inheritance of base class

Abstraction, abstract class, interface

Polymorphism: the concept and use of method coverage

Interface callback

 

8. static

Static attributes are also often used in daily development of java. You need to understand the usage related to the static keyword, and use it in conjunction with other keywords, such as whether it can be used in conjunction with abstract, final and other keywords.

The main things that need to be mastered are:

The definition and use of static properties, and how to initialize when the class is loaded

Definition and use of static methods

Definition and use of static classes

Definition and timing of initialization of static code blocks

 

9. Basic knowledge points

Here are mainly some scattered, some java knowledge points that are not classified by the system.

It is also used a lot in daily development. There is actually a lot of this piece of content, but it is only temporarily summarized here:

Including:

equals

hashcode

tring/stringbuffer

final

finally

finalize

 

10. Collection framework

This is a part that needs to be more mastered. For Java development, it can be said that there is no need to use the collection framework. This is very important. You must be clear about the Java collection interview questions and answers compiled here.

But the knowledge points here are not difficult, but it is best to understand the internal implementation of the collection, because this will help you choose a suitable framework to solve the problem in different scenarios, such as a collection of 1W elements, often Performing the contains judgment operation, knowing the characteristics or internal implementation of the collection, it is easy to make the right choice.

The following content is included here (concurrency related is not included):

Collection framework system: basic Collection, Map

The content of the specific set implementation, the specific implementation of List, Set, Map, internal structure, special methods, applicable scenarios, etc.

Usage of collection-related tools, Collections, etc.

 

11. Exception frame

Exceptions may not be taken so seriously in the development of java. The best practice of exception handling is explained in detail.

Generally, when an exception is encountered, it is thrown directly, or after a random catch, it has no major impact on the overall operation of the program. However, in enterprise-level design and development, the quality of abnormal design and processing is often related to the overall robustness of the system.

For developers, the exceptions of a good system should be handled uniformly to avoid a lot of exception handling logic scattered everywhere; for the system, exceptions should be controllable and easy to operate and maintain. After certain exceptions occur, There should be a way to deal with it and know how to handle it. So although the exception framework is very simple, exception handling is very important for the entire enterprise-level application development. To handle exceptions well, you need to understand the exception system in Java.

There are not many knowledge points that need to be mastered in this part, mainly:

Abnormal system:

Throwable

Exception

RuntimeException

Error

The difference between RuntimeException and general Exception, specific handling methods, etc.

If you want to learn Java, I will share some Java learning materials with you. You don’t have to waste time searching everywhere. I have compiled all the materials from Java entry to proficiency. These materials are all made by me. The latest Java learning routes compiled in the year, Java written test questions, Java interview questions, Java zero-based to proficient video courses, Java development tools, Java practice projects, Java e-books, Java study notes, PDF document tutorials, Java programmers’ experience, Java job resume templates, etc. These materials will definitely help you learn Java in the future. It is a must for every Java beginner. Please enter my Java technology qq exchange group to download by yourself . All the materials are in the group. In the file, you need to communicate and learn more with you when you go in.

 

12. Java IO

IO in Java is not only as simple as file reading and writing, but also includes all input and output operations such as socket network reading and writing. For example, reading the content of Post in a standard HTTP request is also an output process, etc...

For IO, Java not only provides basic Input and Output related apis, but also provides some apis such as Reader and Writer to simplify operations. It is also very important in certain developments (projects involving a large number of IO operations), and is generally used in daily development. It will also involve (logs, reading and writing of temporary files, etc.).

The main knowledge points in this are:

The basic IO system includes InputStream, OutputStream, Reader/Writer, file reading, various stream reading, etc., the concept of NIO, specific usage methods and usage scenarios.

 

13. Multi-threaded concurrency

Multithreading is generally considered a difficult part in Java.

Multi-threading can effectively increase the CPU usage rate and improve the overall system efficiency, especially in the case of a large number of IO operations blocked; you must be clear about the Java multi-threaded interview questions and answers here.

But it is also a double-edged sword. If it is not used well, the system will not only be improved little or not, but it will also bring about problems such as debugging between multiple threads.

There are a lot of content in multi-threading, just briefly explain the knowledge points that need to be mastered in the initial use of multi-threading in Java, and I will have the opportunity to separately introduce the use scenarios of some advanced features in detail. Reply to "multi-thread" in the Java technology stack public account to get a series of multi-thread tutorials.

Implementation and startup of multithreading

The difference between callable and runable

The characteristics and comparison of syncrhoized and reentrantLock

Thread Pool

future asynchronous way to get the execution result

concurrent package

lock

 

14.Network

Java also provides APIs that can directly manipulate the TCP protocol and UDP protocol.

When network performance needs to be emphasized, TCP/UDP can be used directly for communication.

You can see the usage of these related APIs in the source code of Tomcat, etc.

However, in general, TCP is rarely used directly, and frameworks such as MINA and Netty are used for processing. Because there is not much development involved in this area, it will not be listed in detail.

 

15. Date and time processing

For almost every application, the processing of time and date cannot be bypassed, but the usage of time-related API before JDK8 is not friendly.

In that era, you can choose a time frame such as Joda. After the release of JDK8, the new time API basically incorporates the advantages of other frameworks and can already be used directly.

For Java developers, it is necessary to use the API proficiently to deal with time and date.

The specific knowledge points are no longer listed, and a special article will be written in the future to summarize the usage of the time and date API in JDK8.

 

16. XML parsing/JSON parsing

In fact, these two pieces of content are not the content in J2SE, but in daily development, interaction with other programs and configuration files are increasingly inseparable from the analysis of these two formats.

However, for a developer, being able to understand some of the principles and methods of specific XML/JSON parsing will help you to better choose the right way for you in each specific scenario to make your program more efficient and robust. .

XML: Need to understand the basic principles of DOM parsing and SAX parsing and their respective applicable scenarios

JSON: Need to understand the usage of some common JSON frameworks, such as Jackson, FastJson, Gson, etc.

 

17. Maven usage

Maven is not the content of Java, but Maven is revolutionary and brings great convenience to Java development. You must be familiar with these 30 Maven commands.

From the introduction and management of dependencies, the update and release of the development process, and even the version update, using maven can greatly simplify the complexity of the development process, thereby saving a lot of time.

It can be said that maven has become the standard for java developers. So I regard maven as a basic knowledge point for Java developers.

Reply to "Maven" on the Java technology stack public account to get the Maven series of tutorials. In the future, I will put some of my experience and skills on the use of maven, etc., I won't go into details here.

 

18.Generic

This is a new concept introduced in JDK5, but it is actually syntactic sugar.

There is some convenience when writing java code. For general application or business development, you only need to use it simply, and you may not necessarily use operations such as defining generics.

However, some basic public components will be used in the development. You can read this part carefully when you need it. Under normal circumstances, you can simply use it.

 

19. Annotation

It was also introduced after jdk5, and you must understand the meta-annotations.

Spring is an excellent framework, and xml was used as the standard configuration file from the beginning.

However, after Spring 3, especially after the rise of spring-boot, the use of annotations to simplify xml configuration files has become more and more popular. For developers, it can save a lot of time for xml configuration.

But the disadvantage is that the annotations are scattered in various classes, unlike xml, which can have a global understanding and management of all configurations, so there is no way to completely replace all xml.

For general developers, just use annotations. Developers of some public organizations may need to understand the definition and implementation of annotations. You can look at them carefully when you need them.

 

20. RMI

RemoteMethodInvocation, the unique remote invocation interface of Java language, is relatively simple and convenient to use. Click here to learn more about the difference between RMI and RPC.

However, if you need to cross-language, you need to use other methods such as webservice to support it.

Generally speaking, the program does not need to use RMI, but it can be used under specific circumstances. I used RMI to control the remote start and stop of the program in a project.

 

21. JNI

Java Native Interface, which allows to call native interface methods in Java, is generally used to call C/C++ code.

It should be noted that the path problem of loading the so/dll file in java is not complicated to call the interface itself, but it often takes a lot of time to load the required local interface library.

 

The above is just a brief introduction to some of my views and introductions to these basic knowledge and technical points of java.

These contents are derived from some summary of my use of java over the years. There are still some areas where the content is not perfect, which will be added in future articles.

 

At last


If you want to learn Java, I will share some Java learning materials with you. You don’t have to waste time searching everywhere. I have compiled all the materials from Java entry to proficiency. These materials are all made by me. The latest Java learning routes compiled in the year, Java written test questions, Java interview questions, Java zero-based to proficient video courses, Java development tools, Java practice projects, Java e-books, Java study notes, PDF document tutorials, Java programmers’ experience, Java job resume templates, etc. These materials will definitely help you learn Java in the future. It is a must for every Java beginner. Please enter my Java technology qq exchange group to download by yourself . All the materials are in the group. In the file, you need to communicate and learn more with you when you go in.

 

 

Guess you like

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