• The core characteristics of object-oriented: encapsulation, inheritance and polymorphism


    1. Encapsulation  encapsulationDefinition of encapsulation: is the process of hiding the implementation details of an object Hide the implementation details of an object The internal state is usually not accessible by other objects The internal state is not accessed by other objects The only access to manipulate the object data is through its interface Object […]

  • Tomcat source code analysis series (XI) protocolhandler


    PrefaceIn the previous article, we talked about the initialization and startup of the connector. The most important thing is the initialization and startup of the protocolhandler. The default implementation class of protocolhandler in Tomcat is http11nioprotocol. There is another http11nio2protocol in the implementation class of protocolhandler in Tomcat 9.0.16, which is similar in implementation. The […]

  • Android APT Technology


    For reprint, please indicate the source: HTTPS: / / / www.cnblogs.com/tangzh/p/12343786.html,                             http://77blogs.com/?p=199 Apt is the abbreviation of annotation processing tool. It is an annotation processor. When processing annotation, additional source files and other files can be generated according to the annotation […]

  • Six principles of object oriented


    Nowadays, the mainstream programming languages are basically object-oriented. Such as C, C + +, Java. When we use it, we have constructed classes one by one. However, there are many problems in the design of inner or outer classes, which make it difficult to maintain the process oriented logic even though it is an object-oriented […]

  • Extension inheritance principle of class in ES6


    Class methods are added to the prototype chain The essence of JS prototype chain inheritance is to look up layer by layer according to “proto”When inheriting, you only need to point the proto property in the prototype of the subclass to the prototype of the parent classThat’s how we understand what the extensions are doing […]

  • Constructor, static code block, construction code block, common code block in Java


    1. Constructor 1) The name of the constructor must be exactly the same as the class name. A class can have multiple constructors with different parameters (in Java, the common function can have the same name as the constructor, but it must have a return value); 2) The function of the constructor is mainly used […]

  • Java basic learning summary – Super keyword


    1、 What is super? It is a referential variable, a reference to a direct parent object, which is used to refer to a parent object in a subclass. Two, application 2.1 application scope It can only be used in constructors and instance methods of subclasses, but not in class (static) methods of subclasses. Reason: Super […]

  • A detailed explanation of the inheritance super of ES6 class


    Class passextendsKeywords to inherit class a{ constructor(x, y) { this.x = x; this.y = y; } toString(){ return this.x+’ ‘+this.y; } } //Inherit a and create a new Z attribute class b extends a{ constructor(x, y, z) { Super (x, y); // before this this.z = z; } toString2(){ return super.toString()+’ ‘+this.z } } When […]

  • How to write a uitableview


    If you thinkUITableViewDelegateSumUITableViewDataSourceThere are a lot of methods in these two protocols, copy and paste every time, which are almost the same. If you think it needs a lot of code to initiate network request and analyze data, plus the complexity explosion table after refreshing and loading, if you want to know why the following […]

  • I don’t know the solid principle, and dare to say that I am engaged in development!


    Object oriented programming (OOP) brings new design ideas to the field of software development. In the process of object-oriented programming, many developers tend to put code with the same purpose / function together in a class, and strive to solve the current problems in the fastest way. However, this programming method will lead to program […]

  • Java I/O flow


    File reading and writing is a common and basic operation of Java I / O stream. However, byte stream, character stream, InputStream, outpurstream, reader, writer, etc. are all kinds of stream operation classes. Today, we will make a simple summary of the commonly used stream operations. This article strives to be concise, not to see […]

  • How much do you know about Java programming principles


    Seven principles of programming 1、 Principle of opening and closing The function module we designed is open to extension and closed to modification: using interface oriented (Abstract) programming (polymorphism) to realize the extension of function requirements, while not allowing to change the original code. Improve the reusability, maintainability and flexibility of objects. In abstract, we […]