Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Java often meets with each other to share test questions.

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "java common meeting test questions sharing". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian slowly and deeply to study and learn "java common meeting test questions sharing" together!

1. Java thread pool has several types

Java provides four thread pools through Executors:

newCachedThreadPool creates a cacheable thread pool. If the thread pool length exceeds the processing needs, idle threads can be recycled flexibly. If there is no recycling, new threads will be created.

newFixedThreadPool creates a fixed-length thread pool that controls the maximum number of concurrent threads. Exceeding threads will wait in the queue.

newScheduled ThreadPool Creates a fixed-length thread pool that supports timed and periodic task execution

newSingleThreadExecutor creates a single-threaded thread pool that uses only one worker thread to execute tasks, ensuring that all tasks are executed in the specified order (FIFO, LIFO, priority).

2. Principle of HashMap

A: Calculate the storage space of value by hashcode() of key.

3. What does hashcode() in Object return?

A: Returns the integer form of the memory address where the object is located

4. Calendar of map?

Answer: Map provided

(1)set keyset= map.keyset(),

(2)set entrySet= map.entryset();(Encapsulate all key-value pairs in map into Entry object and put them into set)

5. Springboot's startup process

(1)main

(2) Load configuration: The annotated class is equal to the XML configuration file (applicationContext.xml) of spring, assembling all bean transactions, providing a context environment for spring.

(3) Component scanning: component scanning, can automatically discover and assemble beans

Thank you for reading, the above is the content of "java common test questions sharing", after the study of this article, I believe that everyone has a deeper understanding of java common test questions sharing, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report