Tag:Java insight

  • In depth understanding of Java multithreaded communication

    Time:2021-12-11

    catalogue summary introduce Join thread safety Realizing producer and consumer issues summary summary Multi thread communication problem, that is, producer consumer problem The producer and consumer are two threads. The two threads sleep alternately during operation. When the producer is producing, the consumer is not consuming, and when the consumer is consuming, the producer is […]

  • Learn more about Java’s core class library — generic classes

    Time:2021-12-4

    catalogue 1.1 use of generics 1.1.1 generic classes 1.1.2 generic interface 1.1.3 generic methods 1.1.4 tips  1.2 generic restriction types 1.3 wildcard? 1.3.1 upper limit 1.3.2 next session 1.3.3 unlimited 1.4 role of generics summary 1.1 use of generics Generic: parametric model (uncertain, specify type for subsequent use) 1.1.1 generic classes 1.1.2 generic interface When […]

  • In depth understanding of the Java core class library — objects class

    Time:2021-11-29

    catalogue 1 Objects 1.1 objects method 1.2 common methods of objects 1.2.1 equals(Object a, Object b) 1.2.2 isNull(Object obj) 1.2.3 nonNull(Object obj) 1.2.4 requireNonNull(T obj) 1.3 objects source code 2 different from object 2.1 object construction method 2.2 other methods 2.2.1 equals(Object obj) 2.2.2 toString() 2.3 object source code summary 1 Objects 1.1 objects method […]

  • Learn more about the math class, the core Java class library

    Time:2021-11-25

    catalogue Java common class library math 1、 Field summary 2、 Method summary 2.1 common methods 2.1.1 source code of some methods 2.2 arithmetic operation 2.3 trigonometric function 2.4 other unusual methods summary Java common class library math The math class contains methods for performing basic numeric operations, such as basic exponents, logarithms, square roots, and […]

  • Learn more about the Java core class library – arrays class

    Time:2021-11-20

    catalogue Java common class library arrays 1、 Common methods 1.1 toString 1.2 Sort 1.2.1 sort​(T[] a, int fromIndex, int toIndex) 1.2.2 Sort(T[] a) 1.2.3 others 1.3 copyOf 1.4 mismatch 1.5 binarySearch 1.5.1 binarySearch​(T[] a, int fromIndex, int toIndex, T key) 1.5.2 binarySearch​(T[] a, T key) 1.5.3 others 1.6 equals 1.6.1 equals​(T[] a, int aFromIndex, int […]

  • In depth understanding of Java core class library — string class

    Time:2021-11-17

    catalogue 1、 Introduction Piecemeal knowledge points String constant pool Logical division of heap 2、 Create object 2.1.1 direct reference constant area 2.1.2 construction method used 2.1.3 differences between two instantiation methods 3、 Common methods summary 1、 Introduction Piecemeal knowledge points extends Object implements serializable,Comparable< String >,charSequence The string class represents a string, and all string […]

  • Learn more about Java core class libraries — date, calendar, dateformat classes

    Time:2021-11-15

    catalogue 1、 Date 1.1 construction method 1.1.1 Date() 1.1.2 Date(long date) 1.2 common methods 1.3 other methods 2、 Calendar (Abstract) 2.1 get time () 2.2 setting time 2.3 time calculation 2.4 other methods 3、 Dateformat (Abstract) 3.1 construction method summary 1、 Date The date class represents a specific time with an accuracy of milliseconds Two […]

  • Take you to understand the summary of common Java classes

    Time:2021-10-6

    catalogue Common Java classes Packaging Constants in wrapper classes Construction method of packaging class Common methods in packaging Math class enumeration Enumeration Definition Common methods of enumerating summary Common Java classes Packaging Because the basic types in Java language are not object-oriented and do not have the nature of objects, it is inconvenient to use […]

  • An article takes you deeper into Java encapsulation

    Time:2021-9-8

    catalogue How to implement encapsulation Code display Construction method Note: Code display summary How to implement encapsulation It can be divided into two steps: Step 1: declare the variables of the class as private. Step 2: provide public set and get methods to modify and obtain the value of variables. Code display public class User […]