Design pattern of java learning - prototype pattern

Prototype mode summary Use an already created instance as a prototype, and create a new object that is the same as the prototype object by copying the prototype object. structure The prototype pattern includes the following roles: Abstract prototype class: Specifies the clone() method that the concrete prototype object must implement.Concr ...

Posted by rallan on Sat, 20 Aug 2022 17:39:28 +0300

Design mode for java learning - Builder mode

Builder pattern Summary Separating the construction of a complex object from its representation allows the same construction process to create different representations. Separate the components for construction (Builder responsible) and assembly (Director responsible). Thus complex objects can be constructed. This pattern applies when the c ...

Posted by konn on Fri, 19 Aug 2022 23:29:58 +0300

Youwei low code: Transform data conversion

Introduction The low code technology column of Youwei is a brand-new and technology-based column written by the members of Youwei Technology Committee. Based on the research and development and operation and maintenance achievements of low code technology of Youwei in the past 7 years, it mainly introduces the technical principles and arch ...

Posted by bhola on Tue, 16 Aug 2022 12:30:16 +0300

Some questions and understandings about bit operation

Some questions and understandings about bit operation 1. What is the first bit operation? 2. What can bit operations do? 3. Why use bit operations instead of other operations? 4. Since the operation in place is used, how to use its operators and what is the application scenario? For the above personal questions, I surf and read books to co ...

Posted by kailien on Tue, 16 Aug 2022 10:00:17 +0300

Introduction and use of Eureka

catalogue Introduction to Eureka Spring Cloud introduces Eureka 1. Create cloud Eureka server7001 subproject Dependency needs to be introduced (indicates eureka server): Write yml: For main startup, add the annotation @EnableEurekaServer 2.The cloud-consumer-order80 of Eureka client will register into Eureka server and become a consume ...

Posted by stig1 on Sat, 13 Aug 2022 21:17:34 +0300

JVM memory structure

JVM introduction 1. What is a JVM? java virtual machine - the running environment of java programs (java Binary Bytecode operating environment) 2. Benefits of JVM The cornerstone of writing once and running everywhere [key]Automatic memory management, garbage collection function [key]Data subscript out of range checkPolymorphism, object-ori ...

Posted by mike0193 on Fri, 12 Aug 2022 21:44:05 +0300

Mysql data backup and recovery

foreword After reading this article, delete the library and run away! ? It can never happen again! Be sure to develop the habit of risky operation of backup data to avoid wasting time in restoring data. Contents of this article: The role of binlog mysqldump and mysqlbinlog do data backup and data recovery. XtraBackup full backup and increment ...

Posted by Revan on Thu, 11 Aug 2022 21:16:22 +0300

Refactoring: reorganizing functions

1, Put a piece of code into a separate function 1.1 code example 1.2 application scenarios When there is an overly long function or a piece of code that needs comments to make people understand its purpose, put this code into a separate function. 1.3 benefits First, there is a greater chance that functions can be reused with each ...

Posted by TheIceman5 on Wed, 10 Aug 2022 21:29:37 +0300

Java object orientation: the ultimate training of interfaces

Problem description There are four roles as follows. The attributes and behaviors of these roles are Stock investors: name, age, study stock speculation, speak English Fund Investor: name, age, study and speculation Stock Manager: name, age, teaching stock trading, speaking English Fund manager: name, age, teaching and speculation base Pl ...

Posted by ballhogjoni on Tue, 09 Aug 2022 21:47:12 +0300

Encapsulation, inheritance and polymorphism of java

encapsulation Characteristics of encapsulation: data can only be accessed through specified methods.Hide the instance details of the class to facilitate modification and implementation.Specific practical steps of packaging Modify the visibility of attributes to restrict access to attributes, which is generally set to private.Create a pa ...

Posted by zz50 on Tue, 09 Aug 2022 21:33:18 +0300