Java set 22
-
Difference between an ArrayList and a Vector.
-
Talk about storage performance and features for ArrayList,Vector, and LinkedList.
-
What is the difference between fail-fast and fail-safe?
-
The data structure of the HashMap.
-
How does HashMap work?
-
When will Hashmap be expanded?
-
What are the features of the List, Map, and Set interfaces when accessing elements?
-
Elements in a Set cannot be repeated, so what is the way to distinguish between repeated and not? Equals == or equals()? What’s the difference?
-
Two objects with the same value (x.equals(y) == true) can have different hash codes.
-
What’s the difference between heap and stack?
-
What are the basic interfaces of the Java Collection Class framework?
-
What’s the difference between HashSet and TreeSet?
-
What is the underlying implementation of HashSet?
-
How does LinkedHashMap work?
-
Why do collection classes not implement Cloneable and Serializable interfaces?
-
What is an Iterator?
-
What is the difference between Iterator and ListIterator?
-
What’s the difference between an Array and an ArrayList? When should you use Array instead of ArrayList?
-
What are the best practices for Java collection class frameworks?
-
Elements in a Set cannot be repeated, so what is the way to distinguish between repeated and not? Equals == or equals()? What’s the difference?
-
What are the Comparable and Comparator interfaces for? List the differences
-
The difference between Collections and Collections.
JVM and tuning 21
-
Java class loading process?
-
Describe how the JVM loads Class files.
-
Java memory allocation.
-
What is GC? Why GC?
-
Describe the Java garbage collection mechanism
-
How do you tell if an object is alive? (or GC object determination method)
-
Advantages and principles of garbage collection. Two recycling mechanisms are considered
-
What is the rationale behind the garbage collector? Can the garbage collector reclaim memory right away? Is there any way to proactively notify the virtual machine for garbage collection?
-
Is there a memory leak in Java? Please describe it briefly
-
Deep copy and shallow copy.
-
What do system.gc () and Runtime.gc() do?
-
When is the Finalize () method called? What is the purpose of finalization?
-
If a reference to an object is set to NULL, does the garbage collector immediately free the memory occupied by the object?
-
What is Distributed Garbage Collection (DGC)? How does it work?
-
What is the difference between a serial collector and a throughput collector?
-
When can objects be garbage collected in Java?
-
Briefly describe the Java memory allocation and reclamation policy and the Minor and Major GC.
-
Does garbage collection occur in JVM permanent generations?
-
What are the methods of garbage collection in Java?
-
What is a class loader, and what are class loaders?
-
Class loader parent delegate model mechanism?
Concurrent programming 28 problems
-
Has Synchronized ever been used? What’s the mechanism?
-
You mentioned a lock on an object. What exactly is this “lock”? How do I determine the lock of an object?
-
What is reentrant and why is Synchronized reentrant?
-
What optimization has the JVM made to Java’s native locking?
-
Why is Synchronized unfair?
-
What is lock elimination and lock coarsening?
-
Why is Synchronized a pessimistic lock? What is the implementation principle of optimistic lock? What is CAS and what are its features?
-
Is optimism lock necessarily good?
-
How is the implementation principle of ReentrantLock different from Synchronized?
-
So what is the AQS framework?
-
Compare Synchronized and ReentrantLock in as much detail as possible.
-
How does ReentrantLock achieve reentrancy?
-
Besides ReetrantLock, what other concurrency tools in JUC have you been exposed to?
-
Talk about ReadWriteLock and StampedLock.
-
How do I synchronize Java threads with each other? What synchronizers have you learned about? Please introduce them separately.
-
CyclicBarrier and CountDownLatch look very similar.
-
Java thread pool related issues
-
How is thread pooling implemented in Java?
-
How many core construction parameters to create a thread pool?
-
How are threads created in a thread pool? Was it created initially with the start of the thread pool?
-
Since you can create different thread pools by configuring different parameters, what are the default thread pools implemented in Java? Please compare their similarities and differences
-
How do I submit a thread in a Java thread pool?
-
What is the Java memory model, and how do threads in Java see each other’s variables?
-
Talk about what is special about volatile, and why it makes variables visible to all threads?
-
Since volatile guarantees variable visibility between threads, does that mean that operations based on volatile variables are concurrency safe?
-
Compare volatile to Synchronized.
-
How does ThreadLocal address concurrency security?
-
When using ThreadLocal, you need to be careful.
Spring 25 questions
-
What is the Spring Framework? What are the main modules of the Spring framework?
-
What are the benefits of using the Spring framework?
-
What is inversion of Control (IOC)? What is dependency injection?
-
Please explain IoC in the Spring framework.
-
What’s the difference between BeanFactory and ApplicationContext?
-
How many ways can Spring be configured?
-
How do I configure Spring in an XML-based configuration?
-
How do I configure Spring in a Java-based configuration?
-
How to configure Spring with annotations?
-
Explain the life cycle of Spring beans?
-
What are the differences between the scopes of Spring beans?
-
What are Spring inner beans?
-
Are singleton Beans in the Spring framework thread-safe?
-
How do you inject a Java Collection into Spring?
-
How do I inject a java.util.properties into a Spring Bean?
-
Explain the autowiring of Spring beans?
-
Explain the difference between auto assembly modes?
-
How do I turn on annotation-based autowiring?
-
Please give an example of the @required annotation?
-
Can you give an example of the @autowired annotation?
-
Can you give an example of the @qualifier annotation?
-
What is the difference between constructor injection and set injection?
-
What are the different types of events in the Spring framework?
-
How is FileSystemResource different from ClassPathResource?
-
What design patterns are used in the Spring framework?
Design pattern 10
-
Please list some common design patterns in the JDK.
-
What are design patterns? Do you use any design patterns in your code?
-
What is the singleton design pattern in Java? Write thread-safe singleton patterns in Java
-
What is the Observer Design Pattern in Java?
-
What are the main benefits of using the factory model? Where is it used?
-
What is a decorator design pattern implemented in Java? Does it work at the object level or the class level?
-
In Java, why are non-static variables not allowed to be accessed from static methods?
-
Design an ATM machine, please tell your design idea?
-
In Java, when do you use overloading and when do you use overwriting?
-
Give an example of a situation where an abstract class is preferred over an interface
Springboot 22 questions
-
What is Spring Boot?
-
What are the advantages of Spring Boot?
-
What is JavaConfig?
-
How do I reload changes on Spring Boot without restarting the server?
-
What is a monitor in Spring Boot?
-
How to disable THE SECURITY of the Actuator in Spring Boot?
-
How do I run a Spring Boot application on a custom port?
-
What is YAML?
-
How can Spring Boot applications be secured?
-
How to integrate Spring Boot and ActiveMQ?
-
How do I use Spring Boot for paging and sorting?
-
What is Swagger? Did you implement it with Spring Boot?
-
What are Spring Profiles?
-
What is Spring Batch?
-
What is a FreeMarker template?
-
How do I implement exception handling using Spring Boot?
-
Which Starter Maven dependencies do you use?
-
What is a CSRF attack?
-
What are WebSockets?
-
What is AOP?
-
What is Apache Kafka?
-
How do we monitor all Spring Boot microservices?
Netty10 topic
-
What is the difference between BIO, NIO and AIO?
-
What is NIO made of?
-
The Netty thing?
-
Netty’s threading model?
-
What is the cause and solution of TCP packet Sticking/unpacking?
-
What serialization protocols do you know?
-
How do I choose a serialization protocol?
-
Zero copy implementation of Netty?
-
What is Netty’s high performance?
-
NIOEventLoopGroup source?
Redis 16 questions
-
What is redis?
-
The characteristics of the Reids
-
Data types supported by Redis
-
Redis is single-process, single-thread
-
Virtual memory
-
Redis lock
-
Read/write separation model
-
Data fragmentation model
-
Redis’ recycling strategy
-
What are the benefits of using Redis?
-
What advantages does Redis have over memcached?
-
Redis Common performance problems and solutions
-
MySQL has 2000W data, redis only 20W data, how to ensure that the data in Redis is hot data
-
What are the differences between Memcache and Redis?
-
What are the common performance issues with Redis? How to solve it?
-
Redis is the most suitable scenario
Information answer access: concern public number: “programmer Bai Nannan” to obtain the above information