In order to facilitate the interview review, I put all kinds of interview questions to the summary, each question is after their own screening feel need to master, the arrangement includes Java foundation, data structure and algorithm, computer network, operating system, database, multithreading and so on. I’ll post answers to these questions later.

Java Basics

  • Java == vs. Equals and hashCode
  • The difference between int and integer
  • The meaning of abstract classes
  • The difference between interfaces and abstract classes
  • Can I create an immutable object that contains a mutable object?
  • Talk about understanding Java polymorphism
  • StringBuffer StringBuilder
  • The difference between extends and super in generics
  • The difference between processes and threads
  • Final, finally, Finalize
  • Serialization
  • The method and principle of converting string to INTEGER
  • Can static properties and methods be inherited? Can it be rewritten? And why?
  • An understanding of member inner classes, static inner classes, local inner classes, and anonymous inner classes, as well as applications in projects
  • What are some common ways of coding?
  • How do I format dates?
  • Java’s exception system
  • What is an exception chain
  • Throws and throws
  • How reflection works, what are the three ways that reflection creates class instances.
  • Four references in Java
  • What is the difference between a deep copy and a shallow copy?
  • What are compiler constants? What are the risks of using it?
  • Are you familiar with the String intern()?
  • Is there any difference between a=a+b and a+=b?
  • What is the difference between static proxy and dynamic proxy?
  • What is the mechanism for implementing polymorphism in Java?
  • How do I serialize a Java object into a file?
  • Tell me what you understand about Java reflection
  • Explain your understanding of Java annotations
  • Tell me what you understand about dependency injection
  • Talk about generics and give some examples
  • Java String understanding
  • Why is String designed to be immutable?
  • Object equal and hashCode methods overwritten. Why?

multithreading

  • Three ways to start a thread?
  • Talk about the differences between processes, threads, and coroutines
  • How do threads communicate with each other?
  • What are Daemon threads? What does it mean?
  • Is there a difference between daemon threads and local threads in Java?
  • Why have threads instead of just processes?
  • What is a ReentrantLock?
  • What is a thread group and why is it not recommended in Java?
  • The understanding of optimistic lock and pessimistic lock and how to achieve, what are the implementation methods?
  • What is the thread scheduling algorithm used in Java?
  • Which is a better choice, synchronous method or synchronous block?
  • The run() and start() methods differ
  • How do YOU control the number of concurrent access threads a method allows?
  • The difference between Wait and seelp in Java;
  • What does the yield method in the Thread class do?
  • What are immutable objects, and how does it help write concurrent applications?
  • Talk to wait
  • Tify keyword understanding
  • Why are wait, notify, and notifyAll not in thread?
  • What causes a thread to block?
  • Let’s talk about synchronization in Java
  • Talk about the Synchronized keyword, class lock, method lock, reentrant lock understanding
  • Multithreaded access to and effects of static synchronized methods
  • Synchronized method in the same class, two threads access the problem
  • How do you ensure that the thread on which the main() method is located is the last thread to terminate a Java program?
  • Talk about the role of the volatile keyword
  • Talk about the use of the ThreadLocal keyword
  • Talk about NIO’s understanding
  • What are Callable and Future?
  • The difference between the ThreadLocal, synchronized, and volatile keywords
  • The difference between synchronized and Lock
  • ReentrantLock, synchronized, and volatile
  • What is the difference between CycliBarriar and CountdownLatch in Java?
  • In what application scenarios can CopyOnWriteArrayList be used?
  • An internal implementation of ReentrantLock
  • Principle of the lock
  • What is Semaphore in Java?
  • What is the difference between invokeAndWait and invokeLater in Java?
  • What are busy loops in multithreading?
  • How do I check if a thread has a lock?
  • The four necessary conditions for deadlocks?
  • Do object locks and class locks affect each other?
  • What is a thread pool and how is it used?
  • What is the difference between submit() and execute() methods in Java thread pools?
  • What is the difference between the interrupted and isInterruptedd methods in Java?
  • Implement blocking queues in Java
  • BlockingQueue is introduced:
  • What do you need to pay attention to multithreading?
  • How to ensure the security of multithreading read and write files?
  • Principle of multi-thread breakpoint continuation
  • The implementation of breakpoint continuation
  • Realize the producer-consumer model
  • What is ReadWriteLock in Java?
  • Writing a program that causes a deadlock in Java, how would you solve it?
  • Is SimpleDateFormat thread-safe?
  • What is the difference between synchronous and concurrent collections in Java?
  • What is the concurrency of ConcurrentHashMap in Java?
  • What is the Java Timer class? How do I create a task with a specific time interval?

A collection of

  • What’s the difference between Collections and Collections?
  • Change the signature of the equals method of object A. Which equals method will be called when an instance of this object is stored using HashMap?
  • The difference between the List, Set, Map
  • Lists and maps are implemented and stored
  • Implementation principle of HashMap
  • How does a HashMap put data?
  • How is the HashMap expansion operation implemented?
  • How does HashMap differ in JDK1.7 and JDK1.8?
  • The implementation principle of ConcurrentHashMap
  • Implementation principle of HashTable
  • ArrayMap vs. HashMap
  • Difference between HashMap and HashTable
  • Differences between a HashMap and a HashSet
  • How does the Set implement Hash prevent collisions
  • The difference between arrays and linked lists
  • What’s the difference between Array and ArrayList? When is it better to use Array
  • What is.enumset?
  • What is the difference between the Comparable and Comparator interfaces?
  • Fail-fast, a fast failure mechanism for Java collections?
  • The difference between fail-fast and Fail-safe?
  • What is BlockingQueue?
  • What does the Iterator class do
  • Poll () method and remove() method difference?
  • Why does JAVA8’s ConcurrentHashMap abandon segment-based locking? Is there any problem? If you were designing it, how would you set it

JVM

  • When is initialization of a class triggered?
  • Talk about your understanding of parsing and dispatching.
  • What do you know or what GC strategy you use online? What are its advantages and what scenarios are it suitable for?
  • Ja0v00a class loader package 00 in how many 0? What is the father-son relationship between them? What does parental delegation mean? What are the benefits?
  • How do I customize a class loader? What have you used or in what scenarios do you need a custom classloader?
  • What are the parameters for heap memory Settings?
  • What data is stored in Perm Space? Does it cause OutOfMemory?
  • In GC, what is the order in which an object is moved from Space to Space in memory?
  • Have you ever had an OutOfMemory problem? How did you deal with the problem? What are the gains from the process?
  • Have you encountered StackOverflow exceptions? Under what circumstances would you guess it would be triggered? How do I specify the stack size of a thread? How much do you usually write?
  • The memory model and partitions need to be detailed to what is placed in each partition.
  • Dispatch: Static dispatch and dynamic dispatch.
  • What are the optimization policies when the VM is running
  • Explain the difference between StackOverflowError and OutOfMemeryError.
  • How do you tell if an object is dead in the JVM?

Computer network

  • Load a 10M image from the network
  • OSI network architecture and TCP/IP protocol model
  • TCP’s three handshakes and four waves
  • Why do YOU need three handshakes for A TCP connection, not two? Why?
  • How does TCP ensure transmission reliability
  • Differences between TCP and UDP
  • TCP and UDP applications
  • Differences between HTTP1.0 and 2.0
  • HTTP packet Structure
  • HTTP long and short connections?
  • The difference between HTTP and HTTPS and how to achieve security
  • How do I verify the validity of a certificate
  • Get vs. POST
  • TCP congestion processing
  • How does TCP control traffic
  • TCP and UDP correspond to common application layer protocols
  • IP address classification
  • Why do you need an IP address when you have a unique Mac address?
  • What is the difference between a switch, hub and router?
  • The role of the bridge
  • ARP is an address resolution protocol. This section explains how it works in simple language.
  • Function of network Interface card (nic)?
  • The difference between synchronous and asynchronous, blocking and non-blocking in IO
  • The difference between URIs and urls
  • The meaning of URL encoding in GET requests
  • Common status codes and cause phrases
  • Talk about sessions, cookies and Applications
  • How to avoid browser caching
  • What is chunking?
  • Talk about SQL injection
  • DDos attack
  • What are the prevention methods for DDos attacks?
  • What is an XSS attack
  • The process from entering a url to getting a page
  • Data structures and algorithms
  • This section will implement some data structures manually, and I’ve summarized some important data structures below

The data structure

  • Linked list (add, delete and query operations) One-way linked list Two-way linked list
  • Queue (Add, delete, and query operations) A common queue has priority
  • Tree Binary tree (pre-order, mid-order, post-order) balanced tree (try to realize the code) Heap red-black tree (understand the nature, application scenarios)B tree (understand the nature, application scenarios)
  • Graph depth first search width first search shortest path minimum spanning tree Prim algorithm Kruskal algorithm
  • The topology
  • String Knuth-Morris-Pratt algorithm Boyer-Moore algorithm
  • hash

Several algorithm ideas

  • recursive
  • recursive
  • greedy
  • The enumeration
  • Dynamic programming
  • backtracking
  • Divide and conquer

Must learn ten sorting algorithms

  • Selection sort
  • Insertion sort
  • Bubble sort
  • Hill sorting
  • Merge sort
  • Quick sort
  • Heap sort
  • Count sorting
  • Bucket sort
  • Radix sort

The database

  • Please briefly describe the four transaction isolation levels supported by InnoDB in Mysql and the differences between them.
  • What is the use of ENUM in Mysql?
  • The difference between CHAR and VARCHAR?
  • How are transactions implemented through logging, the more in-depth the better
  • Differences between DROP, DELETE, and TRUNCate
  • Locality principle and disk prefetch
  • Database paradigm
  • The difference between stored procedures and triggers
  • Optimization strategies for locking
  • When is an index set but not available
  • When is it inappropriate to build an index?
  • Explain the difference between external join, inner join and self-join in MySQL
  • What are integrity constraints?
  • Mysql storage engine, myISam and InnoDB difference.
  • How do I optimize SQL
  • What are optimistic locks and pessimistic locks? What are INNODB’s standard row-level locks? Explain their meanings.
  • What does MVCC mean and how is it implemented
  • How to solve the primary/secondary delay of MYSQL?

spring

1. Summary of the spring

  • What are the benefits of using the Spring framework?
  • What modules does Spring consist of?
  • Explain AOP modules
  • Explain WEB Modules
  • Core container (application context) module.
  • What is the Spring IOC container?
  • What are the advantages of IOC?
  • What is the usual implementation of ApplicationContext?
  • What is the difference between Bean Factory and Application Contexts?
  • What is the difference between Bean Factory and Application Contexts?

Spring dependency injection

  • What is Spring’s dependency injection?
  • What are the different types of IOC (dependency injection) approaches?
  • What are Spring beans?
  • What does a Spring Bean definition contain?
  • Explains the scope of several beans supported by Spring.
  • Are singleton beans in the Spring framework thread-safe?
  • Explains the life cycle of beans in the Spring framework
  • What are the important bean lifecycle methods? Can you reload them?
  • What is bean assembly?
  • What is bean autowiring?
  • Explain the different ways of automatic assembly.
  • What are the limitations of autowiring?

3. The spring annotations

  • How to start annotation assembly?
  • Talk about @required, @Autowired, @Qualifier annotations.

4. Spring data access

  • How can I use JDBC more effectively in the Spring framework?
  • How do YOU access Hibernate using Spring?
  • What are the advantages of transaction management in the Spring framework?

Spring Faceted Programming (AOP)

  • Explain the AOPAspect Aspect In Spring AOP, what is the difference between concerns and crosscutting concerns?
  • How many different types of automatic proxy are there for notifications?
  • What is weaving in. What are the differences in weaving applications?

6. springMVC

  • What is Spring’s MVC framework?
  • What is the control of the Spring MVC framework DispatcherServletWebApplicationContext? Controller annotation @requestMapping annotation

JavaWeb

The servlet and Tomcat

  • Servlet life cycle difference between Forward and Redirect
  • How does the Tomcat container create instances of servlet classes?
  • What principles are used? What is a cookie?
  • What’s the difference between Session and cookie?
  • Servlet security Issues
  • What are the Tomcat Connector operating modes (optimizations)?

JSP

  • The difference between JSP static and dynamic inclusion
  • What built-in objects does JSP have? What are the effects?
  • JSP and servlet difference, common ground, respective application scope?
  • Write out five common JSTL tags
  • How is a JSP executed? Is it less efficient than servlets?
  • Tell the difference between servlets and CGI?
  • Briefly describe the design pattern of JSP.

The last

I will continue to find some other topics, such as Redis, message queues and some situational problems. I will leave them here for now and give answers later.

And finally, I can’t just give you the interview questions and I’ve given you the answers

Welcome to come to me to get,

Please forward it and add assistant VX: Yunduoa2019 after following it or scan the qr code below and follow the guidance of the assistant to obtain it by yourself

The core document of the interview answer

The most comprehensive core knowledge integration of interview documents ever

Please forward it and add assistant VX: Yunduoa2019 after following it or scan the qr code below and follow the guidance of the assistant to obtain it by yourself