Java finishing common interview questions

operating system

  • Talk about threads and processes, the difference between them
  • The difference between synchronous and asynchronous
  • Difference between blocking and non-blocking
  • Four necessary conditions for the operating system deadlock
  • The difference between ordinary and mmap file read and write, mmap point of attention
  • The difference between CPU-intensive and IO-intensive

Linux

  • linux command used
  • kill usage because a process can not kill (into the kernel mode, ignore the kill signal)
  • System management commands (such as viewing memory - network conditions)
  • Use of the pipeline
  • grep is used, be sure to grasp, each will ask Find in Files
  • shell script
  • find command
  • Use awk
  • To talk about the linux partition Swap
  • The difference between soft and hard links connected
  • Epoll talk about the basic principles, advantages
  • Talk about kernel mode and user mode, why have a user mode and kernel mode, how to switch
  • To talk about the five kinds of IO models

computer network

  • Why hierarchical network
  • Why are there still needs an IP address MAC address
  • IP address subnetting
  • DNS resolution process
  • URI sum URL Ku别
  • Talk about the difference between TCP and UDP, the advantages and disadvantages
  • How TCP to ensure reliable transmission? How do not lose, not heavy, do not leak (three-way handshake, sliding window, flow control, congestion control)
  • TCP three-way handshake, TCP four wave
  • The reason TCP stick package and unpacking generated? Solving strategies?
  • Talk about your understanding of HTTP?
  • http2 major improvements than what 1.1, there is no good way to solve the blocking head thing?
  • Since that HTTP is stateless, that server how to remember the user's last request?
  • The difference between GET and POST
  • Talk about you are familiar with HTTP status codes, what they mean?
  • Talk about a complete HTTP request process
  • The difference between HTTPS and HTTP, https is how to ensure secure data transmission?
  • Session and Cookie difference?

Design Patterns

  • Say what you are familiar with design patterns?
  • Simple factory and abstract factory What is the difference?
  • What is a singleton? Under what circumstances need to use a singleton?

Java Foundation Series

container

  • Collection and Collections What is the difference?
  • What is the difference between List, Set, Map that?
  • ArrayList initialization default length, expansion, copying, adding and deleting time complexity and space complexity
  • ArrayList is a thread-safe collection classes do?
  • What is the difference between ArrayList and LinkedList?
  • How to convert between arrays and List?
  • What is the difference between ArrayList and Vector are?
  • What iterator Iterator that? how to use? What are the characteristics?
  • What is the difference in the Queue poll () and remove ()?
  • Talk about the underlying data structure is HashMap?
  • HashMap and Hashtable What is the difference?
  • How do you decide to use HashMap or TreeMap?
  • When HashMap key storage element exactly how to deal with?
  • The default length HashMap is how much? How expansion?
  • Hash what's the problem? How to avoid or reduce hash collisions?
  • JDK 1.8 HashMap of any changes? Why JDK 1.7 is the first interpolation method, JDK 1.8 is the end of interpolation?
  • ConcurrentHashMap and HashMap difference? Why would ConcurrentHashMap thread safe?
  • Although ConcurrentHashMap is thread-safe, but it also has a problem?
  • TreeMap understand it? What TreeMap biggest feature is? Why have the HashMap TreeMap class should have?
  • Talk about Fail-Fast mechanism, combined with talk about the source
  • Which collection class thread safe?
  • How to ensure that a collection can not be modified?
  • What determines whether a mechanism for the collection class is thread-safe?

Multithreading

  • Thread What state?
  • Parallel and concurrent What is the difference?
  • The difference between threads and processes?
  • What daemon threads are?
  • What are the different ways to create a thread?
  • Say something runnable and callable What is the difference?
  • sleep () and wait () What is the difference?
  • notify () and notifyAll () What is the difference?
  • Why thread communication method of wait (), notify () and notifyAll () is defined in the Object class?
  • Thread run () and start () What is the difference?
  • What is thread safe? In java program how to ensure the safe operation of multi-threaded?
  • What principle to upgrade the lock is?
  • The difference between the static object lock and lock
  • What is a deadlock? How to prevent a deadlock?
  • What ThreadLocal that? What are the usage scenarios?
  • Talk about synchronized to achieve the underlying principle?
  • What is the difference between synchronized and volatile?
  • synchronized and Lock What is the difference?
  • What synchronized and ReentrantLock difference is?
  • Talk about atomic principle?
  • What CAS that? Shortcoming
  • AQS talk about principles?
  • How to stop a thread?
  • final field memory semantics

    Thread Pool

  • The principle of the thread pool, why use the thread pool
  • Difference Executor thread pool, ExecuteService, Executors of
  • What are the thread pool status?
  • Thread pool submit () and execute () method What is the difference?
  • What kinds of thread pool has a work queue?
  • How to understand and bounded unbounded queue queue?
  • ThreadPoolExecutor strategy execution
  • Talk about some common thread pool and use scenarios? Features? Why is not recommended to create a thread pool directly by Executors
  • Four kinds of rejection policy
  • How ThreadPoolExecutor thread pool parameters
  • On a single thread pool is processing services, how to do if a sudden power outage (and blocking queue is processing the request how to deal with)?

reflection

  • What is reflection?
  • What is Java serialization? You need to serialize under what circumstances?
  • What Dynamic proxies are? Which applications have?
  • How to achieve dynamic proxy?

Object copy

  • Why use a clone?
  • How to achieve the object clone?
  • What deep copy and shallow copy difference is?

abnormal

  • Architecture Java exception
  • The difference between throw and the throws?
  • final, finally, finalize what is the difference?
  • try-catch-finally in which part can be omitted?
  • try-catch-finally, if in return the catch, finally will be implemented?
  • Common exceptions like what?

JVM

  • Talk about troubleshooting steps to understanding the jvm, jvm part of the stored contents of the various parts of the common and the jvm.
  • The JVM cooked unfamiliar? Simple talk about the class loading process, which performed those operations?
  • JVM whether to store the contents of the method area will dynamically expand memory overflow occurs whether the reasons which will appear.
  • Who introduced CMS.
  • Who introduced G1.
  • Why jdk8 with metaspace data structures used to replace perm?
  • Simple talk about the external heap memory as well as your understanding and awareness.
  • Understanding of JVM memory model, threadlocal usage scenarios and precautions?
  • JVM's proportion of the old and the new generation?
  • jstack, jmap, jutil respectively meaning? How relevant online troubleshooting the JVM?
  • Java virtual machine data types can be divided into several categories?
  • How to understand the stack, heap? What heap memory? What the stack deposit?
  • Why should distinguish between heap and stack out of it? The stack can not store data?
  • In Java, what is the starting point is the stack, the same is also the starting point of the program?
  • Why not put the basic types heap it?
  • Pass value in Java parameter passing it? Or reference?
  • Java has no concept of pointers?
  • Java, the stack size is set by what parameters?
  • An empty Object object occupy much space?
  • Object reference types are divided into several categories?
  • Talk about garbage collection algorithm.
  • How to solve the problem of memory fragmentation?
  • How to solve the simultaneous presence of object creation and object recycling issue?
  • Talk about memory, generational and life cycle.
  • Trigger garbage collection under what circumstances?
  • How to choose the right garbage collection algorithm?
  • JVM maximum heap size has no limit?
  • Heap size through what parameters?
  • What are the three JVM garbage collector?
  • Throughput preference what the garbage collector? Response time priority it?
  • How JVM tuning? What are some ways?
  • How to understand the memory leak problem? What situation will lead to memory leaks? How to solve?

MySQL

  • ACID is an say what?
  • Talk about four isolation levels, what is the default isolation level is, how to avoid non-repeatable read?
  • What is the difference between char and varchar?
  • What is the difference between float and double?
  • Within the mysql connection, connect the left and right connection What is the difference?
  • mysql index is how to achieve?
  • B + tree index difference and the hash index
  • The difference between B and B + Tree Tree
  • Clustered index and secondary indexes
  • In some cases under what circumstances should not be built less indexed, resulting in failure of the index
  • The difference between the index and key
  • How to verify whether the index mysql meet the demand?
  • Mysql talk about common engine? MyISAM and InnoDB difference? how to choose?
  • Talk about mysql row locks and table locks?
  • Lock algorithm (Record Lock, Gap Lock, Next-Key Lock)
  • MySQL how to achieve redo log and consistency of binlog
  • Say something optimistic and pessimistic locking?
  • Talk about how to achieve MySQL partition, the business layer transparent it? Partition types supported by MySQL What? scenes to be used? The difference between the partition and the partition table?
  • mysql master-slave synchronization principle
  • Talk about MVVC
  • mysql troubleshooting Which means there?
  • How do performance optimization of mysql?

Netty

  • Why Netty faster than the NIO?
  • Talk about zero-copy principle Netty, why is there a kernel space? How management?
  • NIO IO certainly faster than you? Slower than IO under what circumstances?

Spring

  • Why use spring?
  • Aop talk about the realization of the principle? Difference JDK dynamic proxies and proxy CGLIB
  • Ioc talk about the realization of the principle?
  • What are the main module spring there?
  • spring commonly used injection method What?
  • The spring bean thread-safe?
  • spring supports several bean scopes?
  • spring bean automatic assembly what way?
  • spring Affairs implementations What? Several reasons for the failure of the transaction
  • Talk about spring of transaction isolation?
  • Talk about spring mvc running processes?
  • Which components have spring mvc?
  • What is the role of @RequestMapping?
  • What is the role of @Autowired?

Spring Boot

  • What is Spring Boot? Why use Spring Boot? Spring and what is the difference?
  • What Spring Boot core profile is?
  • Spring Boot configuration file, which has several types? What's the difference?
  • Spring Boot What are ways to achieve hot deployment?
  • MicroService how split
  • Talk about DDD

MyBatis

  • Characteristics of mybatis
  • mybatis the # and $ No. What is the difference
  • mybatis How type conversion
  • mybatis of what xml tag
  • How mybatis underlying load mapper, and specifically how to execute SQL statements
  • What actuator (Executor) mybatis there?
  • There are several ways mybatis page?
  • RowBounds are all one-time query results? why?
  • What is the difference mybatis logical page and physical page is?
  • mybatis support lazy loading? What is the principle of lazy loading?
  • MyBatis how to handle batch requests?
  • Mybatis talk about the cache and secondary cache? (high frequency)
  • What The principle mybatis pagination plug-in is?
  • mybatis how to write a custom plug-in?

message queue

  • Talk about what you use messaging middleware?
  • Why should the introduction of messaging middleware in the system?
  • Why messaging middleware technology selection is RabbitMQ? What technology selection is based on?
  • How to ensure high availability of messaging middleware? After avoiding messaging middleware system failure caused total failure?
  • RabbitMQ how to achieve high availability.
  • How to ensure the delivery of outgoing messages only one, duplicate data does not appear?
  • Repeat the message is what caused the production side and the consumer side from two point of view
  • How to guarantee the order of the message? If you do not ensure message ordering, and why not?
  • Have you ever had a backlog of news production failure? If you have not encountered before, you think about how to deal with?
  • RabbitMQ talk about the principles underlying architecture, logical architecture, physical architecture and data persistence mechanisms?
  • You RabbitMQ peak QPS is the number per second? How online deployment, the deployment of the number of machines, how to configure the machine?
  • Kafka talk about the principle underlying architecture of how data is stored on the disk, the overall distributed architecture is how to achieve?
  • How to talk about Kafka is to ensure high fault tolerance data? Zero-copy technology is how to use the? How to optimize high throughput performance of producers and consumers?
  • Talk about your understanding of Kafka source?
  • One feature RocketMQ is support for distributed transactions, the underlying principle of his talk in a distributed transaction support?
  • RocketMQ source read it, talk about your understanding of RocketMQ source?
  • If you were to implement a distributed messaging middleware hands, how would you design the overall architecture to achieve?

Redis

  • What are Redis data types? What are their internal data structure? Which are used in a scene more appropriate?
  • Some people say that Redis is single and was said to be multithreaded, how do you see? Why Redis is single-threaded?
  • Redis and Memcached What is the difference? Why single-threaded multi-threaded efficiency Memcached Redis ratio is much higher?
  • What Redis threading model? Talk about multi-channel I / O multiplexing model?
  • Redis master-slave replication is how to achieve
  • What is Redis avalanche and penetration? What happens after the collapse of Redis? How the system deal with this situation? How to deal with Redis penetration?
  • Redis persistence What are the different ways? the difference? How specific underlying persistence mechanism is implemented?
  • redis support java client has what? jedis and redisson What are the differences?
  • How to ensure that double buffering and write database consistency?
  • What Redis is complicated by competition? How to solve? Learn CAS program Redis transaction it?
  • Redis cluster model works? The key is how Redis addressed? Distributed algorithms which are addressed? Consistency hash algorithm to understand it? How to dynamically add and remove a node?
  • Redis how to achieve distributed lock? What flaws?
  • How do Redis memory optimization?
  • Redis principle set an expiration time?
  • What Redis elimination strategy?
  • Redis common performance problems What? What is the solution?
  • MySQL and Redis difference, MySQL also stores the document format storage engine Memory, what is the difference between them?

Zookeeper

  • raft the merits of the agreement compared to paxos

Nginx

  • Talk about nginx load balancing, advantages, Apache and Nginx difference
  • cgi and fastcgi difference
  • Nginx architecture, module relations and realize accept_mutex and multi-process load balancing
  • nginx deployment time yet appeared 502, 500 had appeared
  • Nginx load balancing service does not result in two calls to a user on IP, how to stay connected

MongoDB

  • MongoDB and MySQL difference, MySQL storage engine is also stored in Archive document format, what they differ?

Solr

  • Solr full amount when the index found that the data has lost, how to deal with?
  • What is the principle Solr search location?
  • Advantages inverted index?

Guess you like

Origin www.cnblogs.com/ThinkInDeep/p/11244952.html