Clear use class of ES6

definitionClass is the syntax sugar of constructor and prototype chain.There are two ways to define a classclass Student { } var Student = class { }Some browsers may not be able to parse the syntax of es6 or above. At this time, you need to parse the code into the syntax recognized by the browser through babel. After the syntax of defining the ...

Posted on Sat, 20 Nov 2021 20:55:45 -0500 by GoncaloF

Class and object -- Simulation of login interface

catalogue (1) Basic thought (2) Implementation of method (3) Overall code implementation (4) Functional module diagram analysis (1) Basic thought OOP thought Starting from the object-oriented idea, in order to realize the simulation of user login interface, specifically, there should be user and user management system, user characteris ...

Posted on Wed, 10 Nov 2021 10:39:41 -0500 by yong

Java accesses class properties and calls methods through reflection

preface Reflection can access properties and call methods on any unknown class or object during code execution The idea of reflection is to establish a reference to the class, and then pass in the object name, access the object properties or call methods. The Java mechanism is to create a unique instance of each loaded class, and then ass ...

Posted on Mon, 08 Nov 2021 06:44:52 -0500 by pulsedriver

JavaIO stream -- use of File class

File class overview File class can create, delete and rename files and directories, but cannot access the file content itself. If you need to access the file content itself, you need to use the subsequent input / output stream. To represent a real File or directory in a Java program, there must be a File object, but a File object in a J ...

Posted on Fri, 24 Sep 2021 11:08:00 -0400 by mlampard