[JavaSE] Chapter 11 generics

11.1 role of generics 11.1.1 concept of generics The so-called genericity is to allow an identifier to represent the type of an attribute in a class or the return value and parameter type of a method when defining a class or interface. This type parameter will be determined when used (for example, inheriting or implementing this interface, de ...

Added by lanbor on Thu, 20 Jan 2022 20:08:24 +0200

Detailed explanation of Java process control

java process control I User interaction Scanner scanner object Scanner class to get user input Basic grammar //Create a scan object to receive keyboard data Scanner scanner=new Scanner(System.in); System.out.println("use next Reception mode:"); //Judge whether the user has entered a string if (scanner.hasNext()){ //Receive in next mode ...

Added by imamferianto on Thu, 20 Jan 2022 19:45:32 +0200

java Foundation_ object-oriented

Three characteristics, encapsulation, inheritance, polymorphism encapsulation Abstract data types are used to encapsulate data and data-based operations to form an indivisible independent entity. The data is protected inside the abstract data type, the internal details are hidden as much as possible, and only some external interfaces are reserv ...

Added by kcengel on Mon, 17 Jan 2022 17:01:12 +0200

1, Knowledge points before two-dimensional array

preface Next, start sorting out the contents of Java. Because the contents in front of the array are basically similar to those in many languages, we will simply sort out the contents in one chapter, mainly starting from the object-oriented notes 1. Understanding java java features Java has the characteristics of simplicity, object-orie ...

Added by Optimo on Mon, 17 Jan 2022 12:40:27 +0200

Internal class, basic type, packaging class, date class

Inner class and API, exception Inner class Access characteristics of internal classes Internal classes can directly access members of external classes, including private classes An object must be created for an external class to access members of an internal classThe definition location of the class inside the member In a class, a method is ...

Added by Phirus on Sun, 16 Jan 2022 07:27:32 +0200

Javase 39 basic exercises

JavaSE 39 basic exercises This article is to help learn the basic Java program. I hope you can practice. I typed the code myself. I hope you can have your own program ideas. Please forgive me for your shortcomings. 1. Fibonacci sequence Title: classical question: a pair of rabbits give birth to a pair of rabbits every month from the ...

Added by celebx on Sun, 16 Jan 2022 06:20:53 +0200

Date event class & exception

1. Time and date 1.1 Date class Time origin in computer January 1, 1970 00:00:00 Time conversion unit 1 second = 1000 milliseconds Overview of Date class Date represents a specific time, accurate to milliseconds Date class constructor Method nameexplainpublic Date()Allocate a Date object and initialize it so that it represents the time ...

Added by tdors on Sat, 15 Jan 2022 18:23:57 +0200

Chapter 12 collection (ArrayList LinkedList generic)

Chapter 12 collection (ArrayList LinkedList generic) Tip: Here you can add the general contents to be recorded in this article: For example, with the continuous development of artificial intelligence, machine learning technology is becoming more and more important. Many people have started learning machine learning. This paper introduces t ...

Added by dmccabe on Sat, 15 Jan 2022 11:05:09 +0200

Java exception system

The exception of Java is class. Its inheritance relationship is as follows: ┌───────────┐ │ Object │ └───────────┘ ▲ │ ┌───────────┐ │ Throwable │ └───────────┘ ...

Added by kooks on Sat, 15 Jan 2022 06:30:22 +0200

[JavaSE] String class in fundamentals 003

String 1. Definition: immutable character sequence The String class is modified by the final keyword, which means that the String class cannot be inherited, and its member methods default to the final method;Once a string is created, it cannot be modifiedJDK 8, the value of the string instance is stored through the character array char[] ...

Added by Grimloch on Fri, 14 Jan 2022 19:05:30 +0200