On Inheritance and polymorphism

On Inheritance and polymorphism 1. Can all methods of the parent class be inherited? Can it be rewritten? Can it show polymorphism? 1.1 non static method 1.1.1 non static methods decorated by public, default and protected It can be inherited by subclass, and can be rewritten if it is not modified by final. When a parent class reference points t ...

Added by Concat on Thu, 19 Dec 2019 19:06:20 +0200

Abstract Retry as a tool class

Background introduction We inevitably write repetitive code in our work, so we need to be abstract, such as extracting common logic into abstract classes, or avoiding redundant code through some tool classes. This article today extracts a tool class from a retry function that invokes a service for reuse.For the sake of introduction, the calling ...

Added by nafarius1357 on Thu, 19 Dec 2019 06:00:39 +0200

LeetCode 300. Longest ascending subsequence

9-8 LIS problem long increasing subsequence Title: LeetCode 300. Longest ascending subsequence Given an unordered array of integers, find the length of the longest ascending subsequence. Example: Input: [10,9,2,5,3,7101,18] Output: 4 Explanation: the longest ascending subsequence is [2,3,7101], and its length is 4. Explain: ...

Added by VapiD on Wed, 18 Dec 2019 17:50:49 +0200

Spring Cloud Distributed Micro Service Cloud Architecture Part 9: Service Link Tracking (Spring Cloud Sleut)

This article focuses on the service tracking component zipkin, which Spring Cloud Sleuth integrates. 1. Introduction Add sleuth to the classpath of a Spring Boot application (see belowfor Maven and Gradle examples), and you will see the correlation databeing collected in logs, as long as you are logging requests. --- From the official website ...

Added by ponies3387 on Wed, 18 Dec 2019 05:21:25 +0200

Spring Cloud Distributed Micro Services Cloud Architecture Part 8: Message Bus

Spring Cloud Bus connects distributed nodes with lightweight message proxies.It can be used to broadcast profile changes or communication between services, or to monitor.This article describes using Spring Cloud Bus to implement configuration file changes that notify the microservice architecture. I. PreparationsThis article is based on the pr ...

Added by Aravinthan on Wed, 18 Dec 2019 05:16:03 +0200

003. Analysis of thread pool application and implementation principle

1. Why use thread pool? Is the more thread pools the better? Thread is an object in java, but also a resource of operating system. It takes time for thread creation and destruction. If create time + destroy time > execute task time, it is not cost-effective. Java objects occupy heap memory, and operating system threads occupy system mem ...

Added by Miichael on Tue, 17 Dec 2019 13:53:25 +0200

Simulate implementation of Promise (Beginner Edition)

Implement Promise Simulated (Small White Edition) This article talks about how to simulate the basic function of a Promise. There are already many articles like this on the Internet. There will be more ink in this article because you want to use your own understanding and spoken in vernacular Promise's basic specifications are referenced in thi ...

Added by Bigun on Mon, 16 Dec 2019 06:06:04 +0200

[Data Structure 05] Red-Black Tree Base - Binary Search Tree

Catalog 1. Introduction to Dichotomy 2. Binary Search Tree Definition 3. CRUD of Binary Search Tree 4. Two extreme cases of binary search trees 5. Summary of Binary Search Tree Preface stay [Algorithm 04] Tree and Binary Tree In this article, we will expand our explanation on the bas ...

Added by dta on Mon, 16 Dec 2019 03:03:03 +0200

From zero on, Promise goes from understanding to implementation

Promise is an object that represents the final completion or failure of an asynchronous operation.It has now become an important solution for asynchronous programming in JavaScript. Before you get even closer to it, there are a few basic concepts to understand. Alternatively, you can find the Here See the full source code. Synchronous and asyn ...

Added by NDK1971 on Mon, 16 Dec 2019 02:10:08 +0200

The new feature of Java 8 - stream comprehensive operation

This is a comprehensive exercise of stream stream collection. Before, I also wrote some common methods, such as conveyor belt: Java 8 set operation easy to use in work , this article is a supplement, more specific and structural, for everyone to learn, code can run, code can run, code can run!!! In addition, for the relevant usage of functional ...

Added by deed02392 on Sun, 15 Dec 2019 16:29:00 +0200