Java inner class? That's enough

catalogue 1, Member inner class concept Generation of class objects within members The internal syntax of an external class is the same as that of an ordinary class. External class: the premise is that the internal class is visible to the external class. Member internal class code example 2, Static inner class concept Generation of sta ...

Posted by arag0rn on Sat, 05 Feb 2022 14:04:13 +0100

Java multithreading state -- crazy God says Java

Status of multithreading: 1. Thread stop It is recommended that the thread stop normally - > utilization times, and dead loop is not recommendedIt is recommended to use flag bit - > set a flag bitDo not use outdated methods such as stop or destroy, or methods not recommended by JDK Custom stop, you can see that threa stops ...

Posted by ognotongo on Sat, 05 Feb 2022 11:44:42 +0100

[summary] implementation summary of self-developed Spring framework

Instance creation 1. Create annotations @ Controller, @ Service, @ Repository, @ Component 2. Extract tag object Realization idea ◆ specify the range and obtain all classes within the range ◆ traverse all classes, get the annotated classes and load them into the container How to get the class collection according to the package name? ...

Posted by srihari3d2010 on Sat, 05 Feb 2022 09:59:10 +0100

Introduction to JAVA -- the fourth lesson

method Statement block Statement block (also called compound statement). The variables defined in the statement block can only be used for themselves and cannot be used externally. //(that is, a statement block can use external variables, while external variables cannot) public class Test19 { public static void main(String[ ] args) { ...

Posted by darcuss on Sat, 05 Feb 2022 09:51:01 +0100

22 API03 - serialization and deserialization

Initial knowledge of serialization and deserialization 1 Overview Serialization refers to the process of transforming the state information of an object into a form that can be stored or transmitted During serialization, an object writes its current state to temporary or persistent storage The object can be recreated later by reading or d ...

Posted by manishdugar on Sat, 05 Feb 2022 09:26:10 +0100

02 Nacos cluster construction

Nacos cluster construction The Nacos production environment must be deployed in the cluster state Cluster structure diagram Official Nacos cluster diagram It contains three Nacos nodes, and then a load balancer agent three Nacos. Here, the load balancer can use nginx. Nacos cluster diagram after using Nginx as load balancer Simulate t ...

Posted by redbullmarky on Sat, 05 Feb 2022 08:04:32 +0100

Introduction and use of Spring Boot

catalogue preface Evolution of Java backend What is Spring boot? text Getting started with Spring boot summary raise a query How to effectively learn methods and technical consultants preface Evolution of Java backend In today's era when the Internet is so developed, the amount of data generated every day is countless. The back- ...

Posted by shiznatix on Sat, 05 Feb 2022 07:01:04 +0100

Initial order of c + + singularity template

Initial stage of formwork Generic Programming Although function overloading can be implemented, there are several disadvantages Overloaded functions only have different types, and the reuse rate of code is relatively low. As long as new types appear, corresponding functions need to be addedThe maintainability of the code is ...

Posted by raptoni on Sat, 05 Feb 2022 06:50:41 +0100

JAVA 23 design modes Daquan factory mode

Factory mode concept Factory Pattern is one of the most commonly used design patterns in Java. This type of design pattern is a creation pattern, which provides the best way to create objects. In factory mode, when creating objects, we do not expose the creation logic to the client, and point to the newly created objects by using a common in ...

Posted by elflacodepr on Sat, 05 Feb 2022 03:45:10 +0100

Java Socket programming from single thread to multi thread to realize chat applet

Single threaded example Realize function For 1-to-1 chat communication between the server and the client, you need to run the server first and then the client. When the user enters bye, close the socket and terminate the chat. Specific operation process Start the server, create a ServerSocket, block the accept method, and wait for the c ...

Posted by codebuilder on Sat, 05 Feb 2022 02:51:37 +0100