The benefits of the Java generics in-house design generics

Source: Internet
Author: User
Tags cas

Share some of the work experience: there is no technology out of business. All new technologies are designed to address some of the business pain points and make specific business more refreshing.

When we have enough technology, we can choose the right technology to solve the problem. Conversely, if there is no technical reserve, will be unprepared, or choose some less appropriate technology to solve, eventually will go some detours, stepping some pits. Detours, trampling is a problem that all projects will encounter, a person detours, the pit may not be any big problem, but the whole project detours, this final bitter or we are these technical personnel.

Technical reserves are critical, whether it is a team or an individual. With sufficient technical reserves, to be able to do their best, to meet the problem can quickly find n solutions, and evaluate the pros and cons of each scheme to make a reasonable choice.
In a word: According to the business scenario selection technology, but the premise is that a variety of technologies have a deep understanding of the pros and cons can be known.

We have mentioned the concept of generics many times in the previous chapters, starting with this section, we will discuss generics in Java, although the basic thinking and concept of generics is relatively simple, but it has some very confusing syntax, details, and limitations, and more content.

So we are divided into three sections, gradually to discuss, this section we mainly introduce the basic concepts and principles of generics, the following section we focus on the puzzling wildcard, the last section, we discuss some details and the limitations of generics.

Subsequent chapters we will introduce a variety of container classes, container classes can be said to be daily application development in everyday use, no container class, it is difficult to imagine what can be developed what really useful program. While container classes are generic-based and do not understand generics, it is difficult to understand the container classes in depth. So, what exactly is generics?

The first time you touch LINQ is when using C #, this syntax is very handy when working with list data. If you want to know more about LINQ, you can get a bit of LINQ, but it doesn't matter if you don't understand it, let me show you the Glamour of LINQ in Lua. To put it simply, LINQ is the part that lets you ignore the loops and make you more professional-related business implementations. It's kind of a grammar candy.

Using CSS3 to complete the 3D perspective, although there are some halo, but the interaction experience that makes people feel very good, use on the mobile side to make some H5 page is very bo people eyeball.

and master the principle of production is not a waste of power, a good study after some of the learning process to share to everyone.

Python3 Multi-threaded Many people can not understand how to run, so this article from the daily life of the program Ape, wrote an easy-to-digest multi-threaded tutorial, this looks like everyone will not feel strange, multi-line threads is very simple and simple!

Don't say multithreading is confined to libraries or frames, and making wheels yourself is the greatest joy.

Ajax is all called "Asynchronous JavaScript and xml", meaning "asynchronous JavaScript and XML". With Ajax we can send requests to the server to interact with the data without blocking the page, or to interpret the asynchronous data transfer. With the help of Ajax, our web page can update the display of data only by local refresh, reduce the amount of unnecessary data, greatly improve the user experience, shorten the waiting time for the user, make the Web application smaller, faster and more friendly.

The basic idea of borrowing a constructor is to use call or apply to copy (borrow) the property and method specified by this in the parent class to the instance created by the subclass. Because the This object is bound at run time based on the execution environment of the function. That is, in the global, this is equal to window, and when the function is called as a method of an object, this is equal to that object. The call, apply method can be used to invoke a method in place of another object. The call and apply methods can change the object context of a function from the initial context to the new object specified by Thisobj.

To look at this code, first get the current state (initialized to 0), when it equals 0, the delegate does not have any threads to obtain the lock, and then through the CAS (the underlying is implemented via Compareandswapint), and set the current thread to hold the lock thread The other thread will return false directly, and when the thread is re-entered, the state is no longer equal to 0, this time it does not need CAs, because the thread already holds the lock and then re-sets the value of state through SetState, where a lock-biased function is implemented, that is, the lock favors the thread;

I've been working on a variety of knowledge in JavaScript, such as closures, scopes, inheritance, constructors, variables, built-in objects, etc. At the same time, is also learning the new knowledge of ES6. What I want to share with you recently is the practice of array instance methods and how to extend an array method.

Locate the corresponding action map (Actionmapping Class). There is no way to perform a related action action without an action map. Let's take a look at the code of the Findactionmapping method.

The goal of new technology is to solve some pain points and optimize work efficiency. Regardless of the new technology is a practical technology, such as Redis, Hadoop and other solutions to solve existing storage problems. Or, like MVC, design patterns, OAuth is generally just a way of thinking, different languages have different implementations. The new technology (thought) is only for a specific pain point of a dose of medicine, the use of the right can be more effective, not when it will be less effective.

We have previously emphasized the concept of data types, Java has 8 basic types, you can define classes, classes are equivalent to custom data types, and classes can have combinations and inheritance. However, in the 19th section, we introduced the interface, which mentions, in fact, many times, we are not concerned about the type, but the ability, for interface and capability programming, can not only reuse code, but also reduce coupling, improve flexibility.

The benefits of the Java generics in-house design generics

Related Article

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.