The purpose of writing this article is to summarize what you have been using for so many yearsSome of Java's experience, mainly with some Java basic knowledge points related, so also hope to share to just get started Java programmer and intends to enter the Java development of the business of prospective novice, hope can give you some experience, can let everyone better learn and use Java.
The main content of this presentation isJ2SE related sections, in addition, will be introduced later in the Java EE-related, and the various frameworks in the framework of the content.
after all these years ofJava development, and combined with some of the experience of interviewing Java developers, I think the main aspect of J2SE is to master the following content.
1. JVM-related (includes features for each version)
for just contactJava, the knowledge of the JVM does not necessarily need to be understood deeply, there is some simple understanding of the concept. But for a veteran developer with more than 3 years of Java experience, the JVM is almost unacceptable.
The JVM, as the basis for running Java, is hard to believe that people who don't know anything about the JVM can eat the Java language very well. When I interviewed developers with more than 3 years of Java experience, the JVM was almost a must-ask question. Of course, the JVM is not the only one to determine the technical ability of the interview problem, but can support Java development capabilities.
in theIn this large class of JVMs, I think the knowledge to be mastered is:
JVM memory model and structure
GC Principle, performance tuning
Tuning:Thread Dump, analyzing the memory structure
Class binary bytecode structure, class loader system, class loading process, instance creation process
method Execution Procedure
New features provided by various major versions of Java (requires a simple understanding)
2. Running Java (Basic prerequisites)
this one might look very simple,Who doesn't run Java programs? But most of the time, we simply use the IDE to execute Java programs, and how does the underlying IDE execute Java programs? A lot of people don't know.
This knowledge point is the most basicJava developers need to master, beginner Java, the first is certainly to teach you how to execute Java programs on the command line, but many people once the Java learning, the IDE used, and forget this. Why do you want to know this, know the most pure Java startup mode, you can start the problem at the time, to analyze the number of directories launched at that time, the implementation of naming, how the parameters, whether there are missing and so on. This will help you develop real-world solutions to those weird and potentially environment-related problems.
Here are some of the things you need to know:
Javac compiling Java files as class files
Use of Java commands, how Java classes with package are started on the command line
The various paths that the Java program involves (Classpath, Java. Library Path, main directory of Java run, etc.)
3. Data type
There's nothing much to say about this, it's justMaster of basic types and object types in Java. You can learn more about how the JDK automatically transforms the knowledge, including packing and unpacking, and also to avoid the same type of judgment after boxing.
key points of knowledge:
Basic Type:int, long, float, double, Boolean, ...
the corresponding object type:Integer and other types to basic type conversion, boxing and unpacking
Object type: Equals, hashcode
Characteristics of String types
4. Objects and instances, creation of objects
in this regard, developers need to understandThe concept of class and instance, and the difference between them, is a fundamental aspect of Java's object-oriented nature. The main points of knowledge are:
The concept of class and Instance
Instance the process created:
1. No inheritance: Allocates memory space, initializes variables, calls constructors
2. Inherited: Handles static actions, allocates memory space, variables are defined as initial values, from base class to subclass, handles initialization at definition, executes construction method
points to note:
static properties, etc. from the base classClass-A subclass to initialize
default non-parametric construction method related attributes
5. Access control
this isOne of the basics of Java packaging Features is that you need to know:
Public protected default private modifier for class, Method, field
6. Process Control
The basis of Java process control, although some grammars are not necessarily common, they need to be understood and used where appropriate.
What you need to know is:
Syntax for process control such as if, switch, loop, for, and while
7. The concept of object-oriented programming
this is aThe core concept of Java requires proficiency for any Java developer. Many features or knowledge points in Java are related to the concept of Java object-oriented programming. In my understanding, a good developer not only needs to understand these features (knowledge points) themselves, but also need to know how these objects are embodied in Java's object-oriented programming concept, which is more useful for developers to master the Java Development language, as well as other object-oriented programming language. Here is simply a list of the main points of knowledge including:
object-oriented three main features: encapsulation, inheritance, polymorphism; Individual definition concepts, what are the characteristics of the respective use scenarios
Static Multi-Dispatch, the concept of dynamic single dispatch
the concept and use of overloading
Inheritance: Interface multi-Implementation, base-class single-Inheritance
abstract, abstract class, interface
Polymorphism : The concept and use of method coverage
Interface Callbacks
8. Static
static properties areJava daily development is also used frequently, need to understand the use of static keyword related, as well as with other keywords, such as whether it can be used in conjunction with the abstract, final and other keywords.
the main needs to be mastered are:
definition of static properties, usage, and how classes are initialized when loaded
definition and use of static methods
definition and use of static classes
the definition and initialization time of static code blocks
9. Basic Knowledge points
Here are some of the scattered, no systematic classification of someJava knowledge points. In the daily development of the use of a lot. This piece of content actually has many, at present only temporarily summed up these several here:
include:
Equals, Hashcode, String/stringbuffer, final, finally, finalize
10. Collection Framework
This is a part that needs to be mastered.Java development, it can be said that there is no need to the collection framework, this is very important. But the knowledge here is not difficult, but for the collection it is best to understand the internal implementation, because it helps you to choose the appropriate framework in different scenarios to solve the problem, such as a set of 1W elements, often to contains judgment operation, know the characteristics of the collection or internal implementation, It is easy to make the right choice.
This includes the following:(concurrency related is not included):
the system of the collection framework:Basic collection, Map
the content of the specific collection implementation,List, Set, MAP specific implementations, internal structures, special methods, applicable scenarios, etc.
Collection-related tool classesUsage of collections, etc.
11. Exception Frame
exception inJava development may not be so important. Generally encountered anomalies, directly on the throw, or simply catch a deal after processing for the overall operation of the program has no significant impact. However, in enterprise-level design and development, the design and processing of the exception is often related to the overall robustness of the system. A good system of exceptions for developers, the processing should be unified, to avoid scattered around a lot of exception processing logic, for the system, the exception should be controllable, and is easy to operation, some anomalies, there should be a way to deal with, know how to operations, so although the exception frame is very simple, However, for the whole enterprise application development, exception handling is very important, to deal with the exception will need to understand the Java exception system.
This part needs to grasp the knowledge point is not many, mainly is:
Abnormal system:
Throwable
Exception
RuntimeException
Error
RuntimeException and general Exception differences, specific treatment methods, etc.
Java IO
IO in Java is not only the file read and write so simple, but also includes the socket network read and write, and so on all the input and output operations. For example, the standard HTTP request post content reading is also an output process, and so on ...
forIo,java not only provides basic input, output-related APIs, but also provides a number of easy-to-operate reader, writer, and other APIs, which are also important in some development (projects involving a large number of IO operations), which are also involved in general daily development (logs, Read and write temporary files, etc.).
The main points of knowledge in this are:
BasicIO system: Including InputStream, OutputStream, Reader/writer, file reading, various stream reading, etc.
The concept of NIO, specific usage patterns and usage scenarios
13. Multithreading Concurrency
Multithreading isJava is generally considered a difficult piece. Multithreading can effectively improve CPU utilization, improve overall system efficiency, especially in the case of a large number of IO operations blocked, but it is also a double-edged sword, if not used well, the system is not only a small increase, or no elevation, but also bring multi-threaded debugging and other issues.
There are a lot of content in multi-threading, just a simple explanationJava in the initial use of multithreading need to master the knowledge points, and later have the opportunity to detail some of the advanced features of the use of scenarios.
Multi-Threading implementation and startup
The difference between callable and runable
Syncrhoized, Reentrantlock of the respective characteristics and comparison
thread Pool
Future asynchronous way to get execution results
Concurrent Bag
Lock
..
14. Network
Java also provides APIs that can operate directly with the TCP protocol and UDP protocol. When you need to emphasize network performance, you can use TCP/UDP to communicate directly. You can see the usage of these related APIs in the source code that looks at Tomcat and so on. However, it is generally less likely to use TCP directly, using frameworks such as Mina and Netty for processing, since there is not much development involved in this area, so it is no longer exhaustive.
15. Time and date processing
For almost every application, the processing of the time and date is not going to go around, butTime-related API usage before JDK8 is not friendly. In that era, you can choose a time frame such as Joda. After the release of the JDK8, the new time API basically incorporates the benefits of other frameworks, which are already well-used.
forJava developers need to be skilled in using APIs to handle time and date.
specific knowledge points no longer listed, will write a special article in the future to summarizeJDK8 the usage of the time-date API.
16.XML Parsing/JSON parsing
Actually, neither of these two pieces of contentJ2SE content inside, but in the daily development, and other program interaction, and configuration file interaction, more and more inseparable from the resolution of these two formats.
However, for a developer, it is possible to understand someXml/json specific analytical principles and methods help you to better choose the right way to make your program more efficient and robust in every specific scenario.
XML: Need to understand the fundamentals of Dom parsing and sax parsing and their respective scenarios
JSON: You need to know some common JSON framework usage, such as Jackson, Fastjson, Gson, etc...
Use of 17.Maven
MAVEN is not content in Java, but Maven is revolutionary and has brought great convenience to Java development. From the introduction and management of dependencies, the updating and release of development processes, to the release of updates, the use of Maven can greatly simplify the complexity of the development process, thus saving a lot of time. It can be said that Maven has become the standard for Java developers. So I put Maven also as a Java developer for the basic prerequisite knowledge points. I'll put some more of my experience and skills on Maven in the future, and I'm not going to dwell on it.
18. Generics
this isJDK5 started to introduce a new concept, in fact, is a syntactic sugar, in the writing of Java code, there will be some convenience, general application or business development, simply to use, do not necessarily use the definition of generics such operations, but the development of some basic public components will be used, you can look at this part when needed, In general, as long as it is simple to use.
19. Labeling
is alsoIntroduced after the JDK5. Spring is an excellent framework, starting with XML as the standard configuration file. However, after the Spring3, especially after the rise of spring-boot, more and more respected the use of annotations to simplify the XML configuration file, for developers, can save a lot of XML configuration time. But the disadvantage is that the labels scattered in each class, unlike XML, can have a global understanding and management of all configurations, so there is no way to say that completely replace all the XML. For general developers, annotations can be used, and some public-build developers may need to understand the definition and implementation of annotations, and can look at them when they need them.
20.RMI
Remotemethodinvocation, the Java language-specific remote calling interface, use or relatively simple and convenient. However, in the case of cross-language, it is necessary to use other methods such as WebService to support. In general, the program does not need to use RMI, but can be used under certain circumstances, I am in a project, using RMI to the program remote start stop control.
21.JNI
Java Native Interface, which allows native interface methods to be called in Java, is typically used for calls to C + + code. It is important to note that the path problem of loading the So/dll file in Java is not complex, but it often takes more time to load the required local interface library.
The above is just a brief introduction of myJava basic knowledge points and the technical point of view and introduction, these are derived from my years of use of Java, some of the summary, I hope to have just touched Java, or intend to develop from Java some experience, hope to be able to learn and use Java more efficiently, to avoid the detours wasted precious time. There are some parts of the content that are not perfect, and will be added after the article. As a result of limited personal ability, of course, there will be some errors and omissions, welcome to correct, discuss together, together to complete this article, hope it can really help people in need.
Some suggestions for Java novice