[object oriented] construction method, main method explanation, static keyword, tool class creation and help document, and create object initialization process

object-oriented I Construction method 1. Question: we have never written a constructor in the class before, but we can still create objects. Where is the constructor used? be careful: 1,If we don't give a construction method, JVM Automatically provides a construction of an empty method body without parameters method 2,If we give a con ...

Posted by liamjw on Sun, 16 Jan 2022 14:17:05 +0100

Object oriented design of java Foundation

static keyword Features of static keyword: 1) Loads as the class loads 2) Priority object exists: It cannot coexist with this (this: represents the address value reference of the current class object) When the object does not have new, the member currently modified by static has memory 3) Statically modified Can be shared by multiple obj ...

Posted by prawn_86 on Sat, 15 Jan 2022 18:25:57 +0100

Abstract abstract class of Java object-oriented

Tip: the following is the main content of this article, and the Java series learning will be continuously updated (1) Basic concepts   abstract class: a superset of ordinary classes, but with more abstract methods than ordinary classes. For a class decorated with the abstract keyword, an abstract class cannot instantiate an obj ...

Posted by SilveR316 on Fri, 14 Jan 2022 23:16:32 +0100

[C + +] operator overloading, friend - class and object practice - Implementation of date class

1. Preface Preliminary knowledge for reading this article: Constructor, copy construct, copy constructClass access qualifierClass instantiationthis pointer Reference return catalog: Operator overloading Friend function, friend class, inner classDate class After we quickly get started with C + +, the first thing to bear the brunt is to lear ...

Posted by GreyBoy on Fri, 14 Jan 2022 20:31:40 +0100

Introduction to java -- object-oriented keywords and internal classes

1 static We sometimes hope that no matter whether objects are generated or how many objects are generated, there is only one copy of some specific data in the memory space. For example, all Chinese have a country name, and each Chinese shares the country name. It is not necessary to assign a variable representing the country name in each Chine ...

Posted by velkymx on Tue, 11 Jan 2022 01:30:27 +0100

Strategy mode 2 of Glide design pattern [DownsampleStrategy]

Strategy mode II DownsampleStrategy Package path: com bumptech. glide. load. resource. bitmap. DownsampleStrategy Indicates the algorithm used when down sampling the image. DownsampleStrategy does not provide any guarantee about the output size. The behavior will vary, depending on the strategy used by the ResourceDecoder and the Android ver ...

Posted by kemper on Mon, 10 Jan 2022 07:10:39 +0100

C + + learning notes - structures and classes

Structures and classes definition Place multiple objects together as a whole //definition struct str { int x; double y; }; //statement struct str; //Only the declaration only knows that str is a struct, but it is not known internally. At this time, str is incomplete type //However, str* mystr can be defined; The pointer size of all ...

Posted by lailaigogo on Tue, 04 Jan 2022 16:35:08 +0100

In depth study of java object-oriented polymorphism and internal classes

I polymorphic 1. Class polymorphism Requirements: Demand: teachers go to work by bike Analysis: teachers, bicycles Demand upgrade / iteration: Bicycle - > car Steps: 1. Create a Car class and write start and stop 2. Write open and close based on the original Teacher class Note: violation of OCP principles OCP - opening an ...

Posted by Dang on Mon, 03 Jan 2022 05:31:00 +0100

Java object oriented review

Java object oriented learning Source of learning materials: Alibaba cloud University Java object-oriented programming Magic Music Technology Software School Other notes will be updated in this note: Java learning notes 1. Class and object 1.1 introduction to object oriented Encapsulation: internal operations are not visible to the outs ...

Posted by amy_ewe on Mon, 03 Jan 2022 04:04:00 +0100

Introduction to java - object oriented

object-oriented inherit Usage scenario: if multiple similar classes have the same attributes and methods, you can extract the same attributes and methods from the parent class Benefits: reduced code redundancy Deep inheritance: When creating a subclass object, will the parent class constructor be called? meeting If you create a s ...

Posted by PatriotXCountry on Sun, 02 Jan 2022 17:39:08 +0100