Java learning notes - Methods

1, Method overview Not to mention what the method is, let's look at the code and analyze where the program has shortcomings and how to improve it. Do not use method int x = 10; int y = 20; System.out.println(x+"+"+y+"="+(x+y)); System.out.println(x+"+"+y+"="+(x-y)); int x1 = 100; int y1 = ...

Posted by Ludo Lambrechts on Sun, 06 Mar 2022 07:26:59 +0100

Abstract factory pattern of GoF design pattern and its examples

definition: Product hierarchy structure: product hierarchy structure is the inheritance structure of products. For example, an abstract class is TV, and its subclasses include Haier TV, Hisense TV and TCL TV. Then the abstract TV forms a product hierarchy between TVs without specific brands. The image TV is the parent class, while the TV of sp ...

Posted by grim1208 on Sun, 06 Mar 2022 06:06:15 +0100

In depth Mybatis framework

Python wechat ordering applet course video https://edu.csdn.net/course/detail/36074 Python actual combat quantitative transaction financial management system https://edu.csdn.net/course/detail/35475 In depth Mybatis framework After learning Spring, we have learned how to manage a class as a Bean by the IoC container, that is, now we can us ...

Posted by dominicd on Sun, 06 Mar 2022 05:59:51 +0100

[builder mode] of design mode

The design principle is a summary of some experience guiding our code design, that is, "mental method"; Object oriented is our "weapon"; Design pattern is "move". Based on mental skill, use weapon moves to deal with complex programming problems. Why is McDonald's so popular? Cousin: brother, I want to eat McDonald ...

Posted by knetcozd on Sun, 06 Mar 2022 04:49:10 +0100

Community property management system based on java SpringBoot framework

The community property management system is divided into two roles: community owner and community property manager. After logging in to the system, the community owner can complain, maintain and report, view bills, log in and register, etc; After logging into the system, the administrator can manage users, and can manage parking spaces, houses, ...

Posted by Brit on Sun, 06 Mar 2022 03:35:43 +0100

Polymorphism, up and down transformation and final keyword

1. Polymorphism 1. What is polymorphism? (inheritance is the premise of polymorphism) Polymorphism refers to various forms in popular terms. Specifically, it refers to completing a certain behavior. When different objects complete it, different forms will be produced. At the code level, each object of the subclass is also the object of th ...

Posted by jamesxg1 on Sun, 06 Mar 2022 02:26:58 +0100

Notification developed by Android (realizing message pop-up, prompt sound and click event)

Notification manager The NotificationManager class is a notification manager. This object is a service maintained by the system and is obtained in the form of singleton mode, so it is generally not instantiated directly. In Activity, you can use Activity Getsystemservice (string) method to get the notification manager object, Activity Gets ...

Posted by wopopd83 on Sat, 05 Mar 2022 23:41:38 +0100

Redis cluster usage example

Today, I learned about the use of redis cluster. Here, I will record the problems encountered in the process 1, Environment construction (docker needs to be installed first) Here, docker will be used to deploy four redis instances (node1-3 as the primary node and node4 as the standby node of 1) Here, four redis instances are deployed on th ...

Posted by drag0n on Sat, 05 Mar 2022 16:34:21 +0100

Java notes (basic sorting)

Java notes (basic sorting) In the rookie tutorial, the foundation of java is very comprehensive and thorough https://www.runoob.com/java/java-intro.html 1.java data type java is a strongly typed language. Variables must be declared to indicate their data types before use. Basic data types: byte, short, int, long, float, double, boolean, ch ...

Posted by jomama on Sat, 05 Mar 2022 15:06:58 +0100

In depth Mybatis framework

In depth Mybatis framework After learning Spring, we have learned how to manage a class as a Bean by the IoC container, that is, now we can use the Mybatis framework in a more convenient way. We can directly hand over SqlSessionFactory and Mapper to Spring for management, and we can use them quickly by injection. Therefore, we need to learn how ...

Posted by Pepe on Sat, 05 Mar 2022 14:32:11 +0100