Ali P7 written test

Ali P7 written test
Ali P7 written test

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.

  1. junit usage, execution order of before, beforeClass, after, afterClass
  2. Distributed lock
  3. Nginx request forwarding algorithm, how to configure forwarding based on weight
  4. What are the problems with implementing redis with hashmap (deadlock, dead loop, ConcurrentH
    ashmap available )
  5. Thread status
  6. The way the thread is blocked
  7. The difference between sleep and wait
  8. The underlying implementation of hashmap
  9. 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
  10. java memory model, garbage collection mechanism, unreachable algorithm
  11. 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
  12. The underlying implementation of aop, how dynamic is the dynamic proxy? If there are 100 objects, how to dynamically
    proxy these 100 objects
  13. Have you ever used maven install. maven test. git (make install the installation according
    to the jar package)
  14. Various configurations of tomcat, how to configure docBase
  15. Several ways of spring bean configuration
  16. Web.xml configuration
  17. Listener for spring.
  18. The implementation mechanism of zookeeper, there is a cache, how to store the registration service
  19. Will IO block? Is readLine blocking
  20. Have you used spring thread pool or java thread pool?
  21. String formatting method (20, 21 these two questions are too low-level)
  22. Time formatting method
  23. What is the timer made of
  24. How the thread exits and ends
  25. 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
  26. Usage scenarios of ThreadLocal
  27. Java's memory model, garbage collection mechanism
  28. 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)
  29. The realization mechanism of qmq messages (qmq is a message queue encapsulated by Qunar.com)
  30. Three ways to traverse the hashmap
  31. Some commands of jvm
  32. The difference between memcache and redis
  33. Where is the row-level lock of mysql added
  34. How is the lock of ConcurrentHashmap added? Is the more segments the better
  35. The difference between myisam and innodb (innodb is a row-level lock, myisam is a table-level lock)
  36. mysql other performance optimization methods
  37. Where to look at the linux system log
  38. How to view network progress
  39. Count the number of bit 1 in the binary representation of an integer
  40. jvm memory model, java memory model
  41. How to dump all the data in java memory
  42. How to manually trigger full garbage collection, how to trigger garbage collection immediately
  43. What will happen to hashmap if there is only one write and the other read all
  44. git rebase
  45. The difference between mongodb and hbase
  46. How to solve concurrency issues
  47. The purpose of volatile
  48. java thread pool (it seems that there is a problem with my understanding before)
  49. mysql binlog
  50. Agency model
  51. How does mysql implement transactions
  52. 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
  53. mysql storage engine
  54. The default isolation level of mysql, other isolation levels
  55. Reverse a linked list (use three pointers, but only send one at a time)
  56. The realization principle of spring Aop, talk about it in detail
  57. When will memory leaks and what exceptions will memory leaks throw
  58. Have you used Autowire annotation
  59. Spring's way of injecting beans
  60. The execution order of various conditions of sql statement, such as select, where, order by, grou
    p by
  61. select xx from xx where xx and xx order by xx limit xx; as
    how to optimize this (see EXPLAIN)
  62. Four elements to write code
  63. Count the 100 IPs with the most IP occurrences in 100G IP files
  64. Zookeeper things, nodes, service providers, how to inform consumers
  65. How do 5 servers elect a leader (election algorithm)
  66. The difference between adapter and proxy mode
  67. Read-write lock
  68. static lock
  69. Transaction isolation level
  70. Facade mode, class diagram (appearance mode)
  71. How does mybatis map the table structure
  72. Binary tree traversal
  73. Master-slave replication
  74. mysql engine difference
  75. Where are the static inner classes loaded? Method area
  76. Where is the class file loaded after compilation
  77. 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
  78. Thread-safe singleton mode
  79. Quicksort performance considerations
  80. volatile keyword usage
  81. Find the size of the table, or what storage engine is available for data statistics
  82. What engine can read more and write less
  83. What engine should be used if you want to count multiple tables
  84. How concurrenhashmap asks for size to be locked, and what to do if this section has
    changed after just asking for a section
  85. 1000 apples in 10 baskets, how to put them, let me get all possible numbers
  86. How is reentrant read-write lock implemented?
  87. Have you used NIO
  88. Have you used java's concurrent package?
  89. sting s=new string("abc") which objects are newly created on the stack
  90. The area allocation of the java virtual machine, what is stored in each area
  91. Distributed Transaction (JTA)
  92. 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 )
  93. What containers does java have (collection, tomcat is also a container)
  94. Binary search algorithm
  95. The advantages of myisam, and the difference with innodb
  96. What types of redis can store
  97. http protocol format, the difference between get and post
  98. The corresponding wait and notify in the reentrant lock
  99. Can redis swap the memory space into the disk (this should be possible, but the interviewer
    told me that it is not possible)
  100. 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?
  101. What kind of lock does synchronized add to the method?
  102. The difference between lock and trylock in reentrant locks
  103. Will innodb fetter the reading of a row of data? No shackles, the actual reading is the copy
  104. Is redis cache distributed? Is the data stored on different servers duplicated?
    What about guava cache? Is it redundant? Different machines store different data
  105. Use awk to count top10 in an ip file
  106. When making statistics on the table, you can directly view the schema info information, that is, view the system information of the table
  107. The current version of mysql
  108. How did the experienced people in the company help? (Generally, the boss will ask about this)
  109. What are your advantages over the same fresh graduate
  110. What help does your good summary habit bring to your future work? Give examples to prove
  111. Atomic classes, thread-safe objects, exception handling methods
  112. 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)
  113. 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
  114. The underlying implementation of LinkedHashmap
  115. 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?
  116. The difference between Override and Overload, in what scenarios
  117. How Java's reflection is achieved
    Ali P7 written test
    Ali P7 written test

    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!

Guess you like

Origin blog.51cto.com/14969174/2542821