[Java basic syntax] Dega teaches you to write a library management system in an hour

preface: Before, I introduced a lot of basic knowledge of Java syntax, but at this time, I feel that I have learned some knowledge, but I still haven't learned it thoroughly. So I wrote a library management system and wrote this article to make my understanding of Java syntax more thorough! 1. Conception First of all, we should think o ...

Posted on Sat, 25 Sep 2021 13:39:18 -0400 by websesame

Java learning -- JavaSE -- exception handling

Abnormal mechanism Java treats exceptions as objects and defines a base class java.lang.Throwable as the superclass of all exceptions.Many Exception classes have been defined in the Java API. These Exception classes are divided into two categories: Error and Exception Error The Error class object is generated and thrown by the Java virtua ...

Posted on Fri, 24 Sep 2021 05:21:25 -0400 by pea_1

First understand the Java language - the difference and relationship between String, StringBuilder and StringBuffer!!! [suggested collection]

After we have learned about inheritance and polymorphism in Java, now we can learn a very important thing: String and StringBuilder and StringBuffer. We started directly!!! Previous articles Preface - how is IDEA configured? Make it easier for you to type code! First knowledge of Java language (I) - basic data types and operators First kn ...

Posted on Mon, 20 Sep 2021 10:57:42 -0400 by kentopolis

Java se -- Inheritance and polymorphism

I. concept and writing of inheritance (1) Basic concepts First, why is there inheritance? In the implementation of classes, we can find that sometimes there are many duplicate codes. For example, use classes to describe two plants: Name: Peony Age: three months Color: Red Food source: photosynthesis Function: it can release flower fra ...

Posted on Sun, 19 Sep 2021 00:51:26 -0400 by raymie

[JAVA basic class library] Objec class

introduction The Object class is the parent class of all classes and arrays and is located under the java.lang package. That is, Java allows all objects of any type to be assigned to variables of Object type. When a class is defined without explicitly specifying its parent class with the extends keyword, the class inherits the Object parent cl ...

Posted on Sat, 18 Sep 2021 23:39:59 -0400 by wefollow

contains and remove in the Collection use depth -- why override equals()?

introduction In the Collection: The contains method determines whether a collection contains a specified element. If so, it returns true; The remove method deletes a single instance of a specified element from the collection; These two methods look very simple, are also very simple to use, and are also very commonly used; But how exactly do th ...

Posted on Sat, 18 Sep 2021 21:45:11 -0400 by Al42

Java internal class summary

Inner class: simply speaking, declare another class inside a class. Internal class classification: static internal class (), non static internal class [member internal class, local internal class (also called method internal class), anonymous internal class)] Non static internal class details: (member internal class) public class Outer{ ...

Posted on Sat, 18 Sep 2021 12:28:00 -0400 by m4x3vo

Advanced Java object oriented

Object oriented advanced 1, Encapsulate private In development, in order to avoid logic errors, we suggest encapsulating all properties and providing setter and getter methods for setting and obtaining operations. significance: Protect or prevent code (data) from being inadvertently damaged by us. Protect member properties from direct acces ...

Posted on Thu, 02 Sep 2021 17:07:29 -0400 by pwes24