[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
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
Fundamentals of reflection
Foreword: let's talk about reflection
Codeword is not easy. Pay attention
Reprint, please explain!
Mind map:
catalogue
What is reflection
The following content will be explained around the Student class
Class class
Reflection instantiation
Reflect dynamic method calls
Reflection read / write properties
Wh ...
Posted by JADASDesigner on Tue, 04 Jan 2022 06:07:30 +0100
week_04 common classes and core collections
Inner class
Local inner class
/* About the local inner class, its writing position, the class defined in the member method of the outer class Local internal classes can access member variables of external classes, including private variables! In the local location of the external class, access the member methods of the internal class and crea ...
Posted by TechXpert on Mon, 03 Jan 2022 21:01:14 +0100
Summary of practical experience of Java reflection mechanism, get started directly!
preface
I often use the reflection mechanism in practical projects, so I will take some summary notes on the learned reflection usage for future replay.
There is such a class:
package com.example.demo;
import com.alibaba.fastjson.annotation.JSONField;
public class User {
private String name;
@Value( value ="age_a")
private ...
Posted by jimdelong on Mon, 03 Jan 2022 16:10:41 +0100
C + + classes and objects (inheritance)
I hope you don't deliberately live in pursuit of a number. I hope you find the real valueYou must insist on being yourself, calm down and do what you like, and then give yourself to fate
inherit
Basic syntax of inheritance
When defining these classes, the members of the lower level have their own characteristics in addition to the co ...
Posted by mohvmark on Fri, 31 Dec 2021 07:07:16 +0100
Serialization and deserialization basis of "Java" classes_ The difference between Serializable interface and Externalizable interface
preface
To serialize and deserialize a class, you only need to implement the java.io.Serializable interface or the java.io.Externalizable interface. Serialization and deserialization can provide support for Java Remote Method Invocation (RMI).
Java serialization
There are three ways to serialize Java:
Implement the java.io.Serializable ...
Posted by benji87 on Thu, 11 Nov 2021 20:12:11 +0100
12000 + word Java reflection, to fully understand the Java reflection mechanism together and pave the way for the learning framework
Java reflection mechanism
Reflection is the key to being regarded as a dynamic language. Reflection mechanism allows programs to obtain the internal information of any class with the help of Reflection API during execution, and can directly operate the internal properties and methods of any object.
After loading the Class, a Class objec ...
Posted by BluntedbyNature on Sun, 03 Oct 2021 20:14:20 +0200