~ Java ~ deep understanding of final keyword

catalogue final data final method final and private keywords final class In Java, final usually means "this cannot be changed". The reason for using final may be: design and efficiency. Learn about the final keyword from three possible situations: data, methods, and classes. final data In Java, data such as compile time cons ...

Posted by waverider303 on Tue, 01 Mar 2022 17:44:44 +0100

Common algorithm sorting

โœจ preface โœจ ๐Ÿ“˜ Blog home page: to Keep blog home page ๐Ÿ™† Welcome to pay attention, ๐Ÿ‘ give the thumbs-up, ๐Ÿ“ Message comments โณ Starting time: March 1, 2022 ๐Ÿ“จ Blogger code cloud address: Blogger code cloud address ๐Ÿ“• Reference book: java core technology Volume 1 ๐Ÿ“ข Programming exercises: Niuke network+Force buckle net As the blogger i ...

Posted by bobby4 on Tue, 01 Mar 2022 16:06:21 +0100

Java reflection mechanism

Overview of Java reflection mechanism 1.Java reflection: the mechanism refers to that in the running state of the program, the object of any class can be constructed, the class to which any object belongs can be understood, the member variables and methods of any class can be understood, and the properties and methods of any object can be ...

Posted by guitarlvr on Tue, 01 Mar 2022 14:34:30 +0100

[Java security] fastjson learning

preface As a supplement to the previous article, learn fastjson after half a year. Initial recognition of fastjson Fastjson is a Java library that can convert Java objects into JSON format. Of course, it can also convert JSON strings into Java objects. Fastjson can manipulate any Java object, even some pre-existing objects without source co ...

Posted by bladechob on Tue, 01 Mar 2022 14:14:07 +0100

JAVA day 41 - hash table

1, You don't know hash tables 1. What is a hash table? We already know a data item, keyword mapping storage location.In fact, our search process is to compare and constantly compare keywords, so that we can find the storage location.Now you should find that they are like functions, X = keyword and Y = storage location.The difficulty of ha ...

Posted by Averice on Tue, 01 Mar 2022 14:09:52 +0100

Detailed explanation and application of NIO

1, Detailed explanation of foundation 1. Traditional IO(BIO) Traditional IO is stream oriented and synchronous blocking io. Each socket request needs to be processed by a corresponding thread. If there are not enough threads to process, the request is either waiting or rejected. That is, each connection requires the service to be processed by ...

Posted by TheMagician on Tue, 01 Mar 2022 13:31:14 +0100

[charm of data structure] 001 Cognitive complexity & dichotomy & XOR operation

Constant time operation If the execution time of an operation is not transferred by the specific sample size, each execution time is a fixed time. Such operations are called constant time operations. Common arithmetic operations (+, -, *, /,%, etc.)Common bit operations (> >, > > >, < <, |, &, ^, etc.)Assignment, comp ...

Posted by Leadwing on Tue, 01 Mar 2022 13:25:55 +0100

Visitor mode of Java design pattern learning

In the design pattern, there is a pattern that provides a visitor class that can change the execution algorithm of our target object class, which decouples the data structure from the data operation. Introduction to visitor mode Visitor patterns are behavioral patternsVisitor pattern provides a visitor class that can change the execution algo ...

Posted by JackOfBlades on Tue, 01 Mar 2022 12:43:36 +0100

9 Best Practices for Java exception handling

Source: http://t.cn/ESocliD Clean up resources in Finally or use the try with resource statement Use Finally Try with resource statement in Java 7 Give accurate exception handling information Record the exceptions you specified Throw an exception using a descriptive message Catch specific exceptions first D ...

Posted by hjunw on Tue, 01 Mar 2022 11:22:00 +0100

Usage and skills of BackgroundLibrary

Library address: https://github.com/JavaNoober/BackgroundLibrary In order to solve a large number of style files in the project, such as shpre, selector and other files, the BackgroundLibrary library is introduced. Let's introduce the use of BackgroundLibrary. Advantages: it reduces the creation of a large number of xml filesDisadvantages: yo ...

Posted by haku on Tue, 01 Mar 2022 11:08:12 +0100