Is polymorphism a compile time behavior or a run-time behavior- Java interview questions (with procedures and explanations)

Polymorphism is running behavior! The certificate is as follows: import java.util.Random; public class InterviewTest { public static Animal getInstance(int key) { switch(key) { case 0: //If key=0 return new Cat(); //Return to the newly created object (CAT) case 1: return new Dog(); default: return new Pig(); ...

Posted by robogenus on Sat, 25 Sep 2021 21:34:52 -0700

❤️ [data structure] dynamic graph + 10000 character detailed explanation stack and queue (dynamic graph + example) [recommended collection] ❤️

🎈 Author: Linux ape 🎈 Introduction: CSDN blog expert 🏆, Huawei cloud sharing expert 🏆, C/C + +, interview, question brushing and algorithm. Please consult me, pay attention to me and chat privately if you have any questions! 🎈 Attention column: C/C + + interview customs collection   (high quality articles are constantly updated ...

Posted by hardyvoje on Sat, 25 Sep 2021 15:30:22 -0700

Java concurrency classic 50 questions

Hello, I'm Dabin. Recently, I read a lot of experience in the interview. I took the time to summarize the common interview questions of Java Concurrent Programming and share them with you here~ First of all, let's share a github warehouse with more than 200 classic computer books, including C language, C + +, Java, Python, front end, data ...

Posted by deezin on Fri, 24 Sep 2021 20:54:33 -0700

Promotion -- 12 -- Concurrent container history

container java containers fall into two categories The first category: Collection is called CollectionThe second category: Map Collection collection The first type of Collection is called Collection. Set means that no matter what the structure of your container is, you can throw one element into it one by one; Map The second c ...

Posted by curlytail on Fri, 24 Sep 2021 20:01:48 -0700

leetcode brush record day009:28 and 8

28. Simple difficulty: passing rate 40% explain: What value should we return when need is an empty string? This is a good question in the interview. For this problem, we should return 0 when need is an empty string. This is consistent with the C language's str () and Java's indexOf() definitions. Question to charity: haystack and need are onl ...

Posted by cavemaneca on Thu, 23 Sep 2021 04:25:57 -0700

Java thread pool must understand application - Principles

preface Java thread pool is one of the foundations that must be mastered in interview and work. Using thread pool can better plan the CPU utilization of applications and improve the fluency of application operation. This article will explore the application and principle of thread pool in the future. Through this article, you will learn: 1 ...

Posted by php_man555 on Wed, 22 Sep 2021 21:22:53 -0700

⚡ Daily algorithm & interview questions ⚡ Study together 8 ️⃣

⚽ Digression Yesterday, a little friend came to me and asked me a lot of questions. What can I do? After understanding, I found that I don't know much about the data structure. I don't know much about how to build linked lists and stacks. I suggest you look at the data structure and fill it up. Let's brush the questions slowly. As for how to ...

Posted by velanzia on Wed, 22 Sep 2021 16:17:14 -0700

HashMap source code for a day! put and resize methods can't understand nanny level analysis, I lose!

HashMap is almost a must in the interview. When you ask HashMap, it must be inseparable from the capacity expansion mechanism. If you don't say much, the liver is over. We know that the bottom layer of HashMap is realized by array + linked list. After JDK1.8, red black tree is introduced. This paper analyzes the HashMap after JDK1.8. First, ex ...

Posted by cmancone on Tue, 21 Sep 2021 01:47:07 -0700

Getting started with dynamic agents

Start time: 20210919 agent Purchasing agent, intermediary, changing ip, merchant, etc Study abroad intermediary (agent): help this American school recruit students. The intermediary is the agent of the school, and the intermediary completes the enrollment function instead of the school. Agency features: Intermediaries and agents do the same ...

Posted by markepic on Mon, 20 Sep 2021 18:59:37 -0700

[advanced Java interview] Why is it forbidden to use BigDecimal's equals method for equivalence comparison?

BigDecimal is a type provided by the java.math package that can be used for precise operations. For example, in scenarios such as amount representation and amount calculation, double, float and other types cannot be used, but BigDecimal with better accuracy support should be used, and many internal methods, such as addition, subtraction, mu ...

Posted by jannz on Sat, 18 Sep 2021 15:02:53 -0700