Analysis of Java class and object & & encapsulation & & construction method

⭐ preface ⭐ This article introduces classes and objects in Java. πŸŽ‰ Welcome to pay attention πŸ”Ž give the thumbs-up πŸ‘ Collection ⭐ Leave a message πŸ“ πŸ”‘GitHub Java warehouse, welcome to visitπŸ”‘ πŸ“The blogger's note link is updated at the first timeπŸ“ 🌲 class Classes are templates or blueprints for constructing objects. The proc ...

Posted by nicandre on Sat, 30 Oct 2021 15:55:47 +0200

Java object oriented

1. Object oriented overview Process oriented: specific, step-by-step, suitable for dealing with simple problems. **Object oriented: * * is abstract. To solve problems, first classify them and think about the divided classes separately. It is suitable for dealing with complex problems and multi person cooperation problems. However, the det ...

Posted by vitorjamil on Fri, 22 Oct 2021 14:49:08 +0200

Fundamentals of Java - object oriented 3

Application of abstract classes: design patterns of template classes // Application of abstract classes: design patterns of template methods public class TemplateTest { public static void main(String[] args) { Template t = new SubTemplate(); t.spendTime(); } } abstract class Template{ // Calculate the time spent exe ...

Posted by gypmaster on Wed, 20 Oct 2021 21:25:57 +0200

(super detailed notes sorting) power node_ Lao Du | JavaSE zero Foundation: P329 (method) - P479

JAVA basic learning method Java's main memory space When the code is placed in the method area to execute the main file first, when the main method is executed, the memory space required by the method is allocated in the stack, which is a data structure Stack data structure Stack data structure: stack What is a data structure? The ...

Posted by ognotongo on Tue, 12 Oct 2021 21:04:36 +0200

Implementation of multithreading

Implementation of multithreading 1. Inherit Thread class     (1) define a class to inherit Thread and override the run() method;     (2) create subclass objects of Thread class;     (3) call start() to start a new thread. //The main thread and the custom thread execute concurrently public class th ...

Posted by lukegw on Sat, 09 Oct 2021 11:05:44 +0200

Java features - polymorphism and abstraction

Polymorphism of characteristics 1, Concept The image point is that the same behavior is performed by different people or things 2, Realization conditions Β  It must be under the inheritance systemDerived classes must override methods in the base classThe overridden method must be called through a reference to the base class 3, ...

Posted by chasiv on Thu, 07 Oct 2021 07:26:56 +0200

Package + static member + code block + internal class

1, Package 1. In order to better manage classes, collect multiple classes into a group and become a software package Package is the embodiment of the encapsulation mechanism of classes and interfaces. It is a better management of classes or interfacesClasses with the same name are not allowed in the same package, but they can exist in differe ...

Posted by ayfine on Sun, 19 Sep 2021 18:08:53 +0200

Map interface overview

1 Map interface Map and Collection have no inheritance relationship The Map collection stores data in the form of key and value: key value pairs Both key and value are reference data types. Both key and value are memory addresses of storage objects. Key plays a leading role, and value is an accessory of key. Common methods in Map interf ...

Posted by sunil.23413 on Mon, 06 Sep 2021 05:14:54 +0200