Java inheritance & & modifier

1. Succession 1.1 implementation of inheritance 1. Concept of succession Inheritance is one of the three characteristics of object-oriented. It can make subclasses have the properties and methods of the parent class, redefine them in subclasses, and add properties and methods 2. Format of implementing inheritance Inheritance is impleme ...

Posted by pfoger on Sat, 12 Feb 2022 06:42:52 +0100

Java holiday assignment (Day04)

I choice question 1. [C language] read the program and select the result (D) int main() { int a = 5; if( a = 0 ){ printf("%d", a - 10); } else { printf("%d", a++); } return 0; } A. -5      B. 6      C. 1      D. 0 Parsing: note that the if statement if (a = 0) is an equal sign, which is an assignment at this ti ...

Posted by Jamez on Sat, 12 Feb 2022 06:37:50 +0100

Java basics collection

catalogue 1, Overview of collections: 1. Differences between sets and arrays: 2. Features of the collection: 2, Collection interface: 1. Various functions in Collection: 2, Traversal of collection: 1. Use the acquisition function to realize traversal: 3, List interface (inherited from Collection interface) 1. Features of List interface ...

Posted by rel on Sat, 12 Feb 2022 05:59:44 +0100

Java realizes Title Similarity Calculation and text content similarity matching. Java calculates title text content similarity through SimHash

Catalogue 1, Foreword 2, About SimHash Supplementary knowledge 1) What is Hamming distance 2) Application of Hamming distance 3) What is edit distance 3, Geometric significance and principle of SimHash algorithm 1) Geometric significance of SimHash algorithm 2) Calculation principle of SimHash III) text similarity calculation 4, Java ...

Posted by blindeddie on Sat, 12 Feb 2022 05:04:37 +0100

Interview: virtual machine stack 5 consecutive questions, I'm happy to hear it

On the way to the interview "Didi, Didi..." master, where are we? I'm in a hurry for an interview. Master: it's almost there. It's the next intersection. I'm really convinced by these people. I can't drive all the way in. Listening to the driver's complaints, I can't help thinking of a limerick poem: the tail lights are red all o ...

Posted by shawjames on Sat, 12 Feb 2022 04:46:48 +0100

Java Basics - memory pointing 1

What is an object? public class Cat { public int age; public String name; public char sex; public void run(int ag) { this.age=ag; } public static void main(String[] args) { Cat cat1=new Cat(); Cat cat2=new Cat(); Cat cat3=new Cat(); cat1.run(10); cat2.run(11); System.out.println(cat1.age); System.out.println(cat2.ag ...

Posted by pvechi on Sat, 12 Feb 2022 03:47:41 +0100

Java implements password adding random salt for MD5 digest encryption (2021 / 05 / 11)

Java implements password adding random salt for MD5 digest encryption (2021 / 05 / 11) 1. General In daily development, we often face the problem of saving the user password. We must not store the password in plaintext to the database. We can use hash digest algorithm to encrypt the password and then save it to the database. Hash digest ...

Posted by Begby on Sat, 12 Feb 2022 03:13:08 +0100

Android Countdown Custom Control (for Shop Secondary Kill)

(1) Preface Android actually provides a countdown control called CountDownTimer, which is easy to use, but it's cumbersome to follow the desired countdown style. For example, we want the countdown to show HH:MM:SS or HH-MM-SS in the style we want, or we want to show it as follows: The work to be done is tedious, not impossible, but expensive, ...

Posted by markduce on Sat, 12 Feb 2022 03:03:48 +0100

Analyze the implementation principle of thread pool (pooling Technology) from the source code

Thread pool is a very important knowledge point and a typical application of pooling technology. I believe many people have the experience of using thread pool, but do you know the implementation principle of thread pool? In this article, we will explore the source code of thread pool. Origin of thread pool Background: with the upgradi ...

Posted by digitalhuman on Sat, 12 Feb 2022 02:43:50 +0100

Basic design pattern -- observer pattern

theme: channing-cyan highlight: androidstudio "This is the 18th day of my participation in 2022's first update challenge. For details: 2022 first revision challenge」 preface Nothing. Today, relax a little. I accidentally brushed a small video about the implementation of Spring observer mode when I visited Zhihu. I feel it's a littl ...

Posted by Cynthia on Sat, 12 Feb 2022 01:46:03 +0100