Preface
Congratulations on finding a "shortcut" to the big factory. Don't ask me how long it takes to clean it up. Now my dark circles are exactly the same as the giant panda, and my scalp is quite cool. Anti-hair loss shampoo can be recommended.
- junit usage, execution order of before, beforeClass, after, afterClass
- Distributed lock
- Nginx request forwarding algorithm, how to configure forwarding based on weight
- What are the problems with implementing redis with hashmap (deadlock, dead loop, ConcurrentH
ashmap available ) - Thread status
- The way the thread is blocked
- The difference between sleep and wait
- The underlying implementation of hashmap
- Ten thousand people are competing for 100 red envelopes, how to implement (no queue), how to ensure that two individuals can not rush
into the same red envelope, distributed lock available - java memory model, garbage collection mechanism, unreachable algorithm
- Two Integer reference objects are passed to a swap method to exchange references within the method.
After returning , will the values of the two references be found to change - The underlying implementation of aop, how dynamic is the dynamic proxy? If there are 100 objects, how to dynamically
proxy these 100 objects - Have you ever used maven install. maven test. git (make install the installation according
to the jar package) - Various configurations of tomcat, how to configure docBase
- Several ways of spring bean configuration
- Web.xml configuration
- Listener for spring.
- The implementation mechanism of zookeeper, there is a cache, how to store the registration service
- Will IO block? Is readLine blocking
- Have you used spring thread pool or java thread pool?
- String formatting method (20, 21 these two questions are too low-level)
- Time formatting method
- What is the timer made of
- How the thread exits and ends
- What locks does java have? Optimistic lock, pessimistic lock, synchronized, reentrant lock, read-write lock, have you used
reentrantlock? The difference between reentrantlock and synmchronized - Usage scenarios of ThreadLocal
- Java's memory model, garbage collection mechanism
- Why start a thread of execution to be called instead of directly run (direct run, not with the ordinary method
What is the difference, to emphasize start, run will run as a thread method) - The realization mechanism of qmq messages (qmq is a message queue encapsulated by Qunar.com)
- Three ways to traverse the hashmap
- Some commands of jvm
- The difference between memcache and redis
- Where is the row-level lock of mysql added
- How is the lock of ConcurrentHashmap added? Is the more segments the better
- The difference between myisam and innodb (innodb is a row-level lock, myisam is a table-level lock)
- mysql other performance optimization methods
- Where to look at the linux system log
- How to view network progress
- Count the number of bit 1 in the binary representation of an integer
- jvm memory model, java memory model
- How to dump all the data in java memory
- How to manually trigger full garbage collection, how to trigger garbage collection immediately
- What will happen to hashmap if there is only one write and the other read all
- git rebase
- The difference between mongodb and hbase
- How to solve concurrency issues
- The purpose of volatile
- java thread pool (it seems that there is a problem with my understanding before)
- mysql binlog
- Agency model
- How does mysql implement transactions
- When is read and write separation mandatory to read the main library, which method is used to determine which slave library is read, and what method is used to
synchronize mysql from the library - mysql storage engine
- The default isolation level of mysql, other isolation levels
- Reverse a linked list (use three pointers, but only send one at a time)
- The realization principle of spring Aop, talk about it in detail
- When will memory leaks and what exceptions will memory leaks throw
- Have you used Autowire annotation
- Spring's way of injecting beans
- The execution order of various conditions of sql statement, such as select, where, order by, grou
p by - select xx from xx where xx and xx order by xx limit xx; as
how to optimize this (see EXPLAIN) - Four elements to write code
- Count the 100 IPs with the most IP occurrences in 100G IP files
- Zookeeper things, nodes, service providers, how to inform consumers
- How do 5 servers elect a leader (election algorithm)
- The difference between adapter and proxy mode
- Read-write lock
- static lock
- Transaction isolation level
- Facade mode, class diagram (appearance mode)
- How does mybatis map the table structure
- Binary tree traversal
- Master-slave replication
- mysql engine difference
- Where are the static inner classes loaded? Method area
- Where is the class file loaded after compilation
- How can the overall response time of web http requests become longer and the number of requests processed will decrease
? What should I do ? Using queues, when you can’t handle so many http requests, put the requests in the queue
and process them slowly. How does the web implement queue - Thread-safe singleton mode
- Quicksort performance considerations
- volatile keyword usage
- Find the size of the table, or what storage engine is available for data statistics
- What engine can read more and write less
- What engine should be used if you want to count multiple tables
- How concurrenhashmap asks for size to be locked, and what to do if this section has
changed after just asking for a section - 1000 apples in 10 baskets, how to put them, let me get all possible numbers
- How is reentrant read-write lock implemented?
- Have you used NIO
- Have you used java's concurrent package?
- sting s=new string("abc") which objects are newly created on the stack
- The area allocation of the java virtual machine, what is stored in each area
- Distributed Transaction (JTA)
- Pay attention to the problems when using threadlocal (ThreadLocal and Synchronized are both used to
solve multi-thread concurrent access. However, ThreadLocal and synchronized are essentially different.
Synchronized is the use of a lock mechanism, so that variables or code blocks can only be used by one thread at a time visit
Q. and ThreadLocal for each thread provides a copy of the variable so that each thread in a certain
a time to visit is not the same object, thus isolating the multiple threads of data of the data were
shared, while Synchronized but On the contrary, it is used to obtain data
sharing when communicating between multiple threads ) - What containers does java have (collection, tomcat is also a container)
- Binary search algorithm
- The advantages of myisam, and the difference with innodb
- What types of redis can store
- http protocol format, the difference between get and post
- The corresponding wait and notify in the reentrant lock
- Can redis swap the memory space into the disk (this should be possible, but the interviewer
told me that it is not possible) - java thread pool based on fixed-length buffer and two thread pool, when requests are too much like
what treatment? The queue for fixed-length events, what if the queue is also full? Swap into disk? What about the cache-based
thread pool solution? - What kind of lock does synchronized add to the method?
- The difference between lock and trylock in reentrant locks
- Will innodb fetter the reading of a row of data? No shackles, the actual reading is the copy
- Is redis cache distributed? Is the data stored on different servers duplicated?
What about guava cache? Is it redundant? Different machines store different data - Use awk to count top10 in an ip file
- When making statistics on the table, you can directly view the schema info information, that is, view the system information of the table
- The current version of mysql
- How did the experienced people in the company help? (Generally, the boss will ask about this)
- What are your advantages over the same fresh graduate
- What help does your good summary habit bring to your future work? Give examples to prove
- Atomic classes, thread-safe objects, exception handling methods
- Int number 400000000, how to find the number of repeating (a hash method, a building 32 2
square two-bit hash array, int each take a number, it can be found in the power of the H 2 32 hash
array ash , Then set the bit to 1 to indicate that it already exists) - 400 million URLs, find out the duplicates (considering insufficient memory,
allocate the URLs to 1000 files through the hash algorithm, there will be no duplication between different files, and then find the duplicates separately
)
there are 10,000 Array, each array has 1000 integers, and each array is in descending order. Find the
largest N number from it, N<1000 - The underlying implementation of LinkedHashmap
- The purpose of the version number of the class during class serialization. If a version number is not specified, how does the system
handle it? What happens if you add a field? - The difference between Override and Overload, in what scenarios
-
How Java's reflection is achieved
end
The above is the latest interview questions. It is not easy to organize. If it is helpful to you, remember to like + bookmark, thank you for your support!