English
- What is the difference between a process and a thread?
- What is the difference between process switching and thread switching?
- What is the difference between parallelism and concurrency?
- What is a daemon thread?
- What are the different ways to create a thread?
- What are the states of a thread?
- What is the difference between
sleep()
and wait()
?
- What is the difference between
notify()
and notifyAll()
?
- What is the difference between the
run()
and start()
methods of a thread?
- What are the ways to create a thread pool?
- What are the states of a thread pool?
- What is the difference between the
submit()
and execute()
methods in a thread pool?
- How can you ensure thread safety in a Java program?
- What is the principle behind synchronized lock upgrading in multithreading?
- What is a deadlock?
- What is the difference between deadlock and starvation?
- How can deadlocks be prevented?
- What is ThreadLocal? What are its use cases?
- Explain the underlying implementation of
synchronized
.
- What is the difference between
synchronized
and volatile
?
- What are the communication methods between threads?
- What are the communication methods between processes?
- What is thread safety? Is
Vector
a thread-safe class?
- What is a
FutureTask
?
- What is the difference between the heap and the stack in Java?
- What is a thread pool, and why is it used?
- What is the difference between livelock and deadlock in Java?
Chinese
- 進程和線程的區別是什麼?
- 進程切換和線程切換的區別是什麼?
- 並行和並發的區別是什麼?
- 守護線程是什麼?
- 創建線程有哪幾種方式?
- 線程有哪些狀態?
sleep()
和 wait()
有什麼區別?
notify()
和 notifyAll()
有什麼區別?
- 線程的
run()
和 start()
有什麼區別?
- 創建線程池有哪幾種方式?
- 線程池都有哪些狀態?
- 線程池中
submit()
和 execute()
方法有什麼區別?
- 在 Java 程序中怎麼保證多線程的運行安全?
- 多線程中
synchronized
鎖升級的原理是什麼?
- 什麼是死鎖?
- 死鎖和饑餓的區別是什麼?
- 如何防止死鎖?
ThreadLocal
是什麼?有哪些使用場景?
- 說一下
synchronized
底層實現原理?
synchronized
和 volatile
的區別是什麼?
- 線程有哪些通信方式?
- 進程有哪些通信方式?
- 什麼是線程安全?
Vector
是一個線程安全類嗎?
- 什麼是
FutureTask
?
- Java 中堆和棧有什麼不同?
- 什麼是線程池?為什麼要使用它?
- Java 中活鎖和死鎖有什麼區別?