9 Knowledge points for Java programming __java

Source: Internet
Author: User

Java


9 Knowledge points of programming

Now small make up to share the following 9 points of content, carefully read slightly.

1. Multithreading concurrency

Multithreading is commonly considered a difficult piece in Java. Multithreading can be used to effectively improve the CPU utilization rate, improve overall system efficiency, especially in the case of a large number of IO operations blocking; but it is also a double-edged sword, if not used well, the system is not only to promote small, or not to upgrade, but also bring multiple threads between debugging and so on.

There are a lot of content in multiple threads, just a simple description of Java in the initial use of multithreading needs to grasp the knowledge points, and then have the opportunity to detail some of the advanced features of the use of the scene. Implementation and startup of multithreading

The difference between callable and runable

Characteristics and comparison of Syncrhoized,reentrantlock

Thread pool

Future asynchronous way to get execution results

Concurrent Bag

Lock

2. The network

Java also provides APIs that can directly manipulate TCP protocols and UDP protocols. When you need to emphasize network performance, you can communicate directly using TCP/UDP. You can see the usage of these related APIs in the source code for Tomcat and so on. But generally also relatively few direct use TCP, will use such as Mina, Netty such a framework to deal with, because this aspect of development involves little, so no longer detailed list.

3. Time and date processing

Time and date processing is not a JDK8 for almost every application, but the API usage before the time is not friendly. In that era, you can choose Joda time frame. After the release of JDK8, the new time API basically blends the advantages of other frameworks and is already well used directly.

For Java developers, it is necessary to use APIs skillfully to deal with time and date.

4.XML Parsing/JSON parsing

In fact, these two pieces of content is not j2se inside the content, but in the day-to-day development, and other programs, and configuration file interaction, more and more inseparable from the two formats of the analysis.

XML: Need to understand the fundamentals of Dom parsing and sax parsing and their respective scenario JSON: need to know some common JSON framework usage, such as Jackson,fastjson,gson.

Use of 5.Maven

MAVEN is not the content of Java, but Maven is revolutionary and brings great convenience to Java development. From the introduction and management of dependencies, the updating of development processes and the release of releases, and even the release of updates, using MAVEN can greatly simplify the complexity of the development process and thus save a lot of time. It can be said that Maven has become the standard for Java developers. So I put Maven as a prerequisite for Java developers as a knowledge point. I'll put some of my experiences and tips on Maven in the future.

6. Generic type

This is the new concept that JDK5 began to introduce, which is actually a grammatical sugar, when writing Java code will be a little convenient, the general application or business development, simply to use, does not necessarily use the definition of generics such operations, but the development of some basic common components will be used, you can look at this section when needed , in general, as long as the simple use can be.

7. Callout

was introduced after Jdk5. Spring is a good framework, starting with XML as a standard configuration file. But after the Spring3, especially the rise of spring-boot


, it is becoming more and more popular to use annotations to simplify XML configuration files, which can save a lot of XML configuration time for developers. But the disadvantage is that tagging is scattered across classes, unlike XML, which has a holistic understanding and management of all configurations, so there's no way to say that it completely replaces all XML. For the general developer, the annotation can be used, some public-built developers may need to understand the definition and implementation of annotations, can be more detailed when the need to look at.

8.RMI

Remotemethodinvocation,java language-specific remote call interface, the use is still relatively simple and convenient. However, in the case of cross-language, it is necessary to use other means such as webservice to support. Generally speaking, the program does not need to use RMI, but can be used in a specific case, I am in a project, using RMI for the program to start remote control stop.

9.JNI

Java Native Interface, which allows local interface methods to be invoked in Java, and is typically used for calls to C + + code. Note that the path to loading the So/dll file in Java is not complicated by its calling interface, but it often takes more time to load the required local interface library.

Java Free learning materials Live Public course Group: 175161984


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.