Summary of first-line Internet enterprise interview questions (helping you get an offer)

Source: Internet
Author: User

> Answers attached to questions

1. JUnit usage, before, beforeclass, after, and afterclass execution sequence

2. Distributed locks

3. How to configure the weight-based forwarding for nginx request forwarding algorithm

4. What is the problem with implementing redis with hashmap (deadlock, endless loop, concurrenthashmap available)

5. thread status

5. Thread Blocking

6. Differences between sleep and wait

7. Underlying Implementation of hashmap

8. 10 thousand people grab 100 red packets, how to implement (no queue), how to ensure that two people cannot grab the same red envelope, distributed locks available

9. Java memory model, garbage collection mechanism, and inaccessibility Algorithms

10. The two integer reference objects are passed to a swap method to exchange references within the method. After the return, will the two referenced values change?

11. At the underlying implementation of AOP, how is the dynamic proxy? If there are 100 objects, how can we dynamically proxy the 100 objects?

12. Have you used Maven install. Maven test. Git (make install is to install a local jar package)

13. how to configure docbase for various Tomcat configurations

14. Spring bean configuration methods

15. Web. xml configuration

16. Spring listener.

17. zookeeper implementation mechanism, cache, and how to store registered service

18. Will Io be blocked? Is Readline blocked?

19. Have I used a spring thread pool or a Java thread pool?

20. String formatting method (20, 21)

21. Time formatting Method

22. What is the timer used?

23. How does the thread exit and end?

24. What locks does Java have? Optimistic lock pessimistic lock synchronized can be reloaded into the lock read/write lock. Have you used reentrantlock? Difference between reentrantlock and synmchronized

25. Use Cases of threadlocal

26. Java Memory Model and garbage collection mechanism

27. Why do thread execution need to call start instead of directly run (direct run is no different from normal methods. First, start is called before run runs as a thread method)

28. Implementation Mechanism of qmq messages (qmq is a self-encapsulated message queue on the qmq Network)

29. Three Methods for Traversing hashmap

30. Some JVM commands

31. Differences between memcache and redis

32. Location of the MySQL row-Level Lock

33. How is the concurrenthashmap lock applied? Is it better to have more segments?

34. Differences between MyISAM and InnoDB (InnoDB is a row-Level Lock and MyISAM is a table-Level Lock)

35. Other MySQL Performance Optimization Methods

36. Where can I view Linux system logs?

37. How to view Network processes

38. count the number of bits in the binary representation of an integer as 1

39. JVM memory model, Java Memory Model

40. How to dump all Java memory data

41. How to manually trigger full garbage collection and trigger garbage collection immediately

42. What will happen if only one hashmap can write all the other data?

43. Git rebase

44. Differences between MongoDB and hbase

45. How to Solve concurrency Problems

46. Usage of volatile

47. Java thread pool (as if I had a problem with my previous understanding)

48. BINLOG of MySQL

49. Proxy Mode

50. How does MySQL implement transactions?

51. When is read/write splitting forced to read the master database, the way in which the slave database is read, and the way in which MySQL is synchronized from the slave Database

52. MySQL storage engine

53. Default isolation level for MySQL and other isolation levels

54. Reverse a linked list (use three pointers, but send only one at a time)

55. Implementation Principles of Spring AOP.

56. When will Memory leakage occur? What exceptions will Memory leakage cause?

57. Have you used autowire annotation?

58. Spring bean Injection Method

59. execution sequence of various SQL statements, such as select, where, order by, group

60. Select XX from xx where xx and XX order by XX limit xx; how to optimize this (see explain)

61. Four RMB for code writing

62. Count the maximum number of 100 IP addresses in the gb ip Address File

63. zookeeper transactions, nodes, and service providers fail to inform consumers

64. How to select the leader (Election Algorithm) for five servers)

Java development engineers who have been working for one or five years can join our Java architecture discussion group: 760940986 (relevant questions and answers, and interview Guidance)
The Group provides architecture video materials for high availability, high concurrency, spring source code, mybatis source code, JVM, big data, netty, and other technical knowledge.
There are also a large number of Daniel in the Group to communicate and answer interview guidance, Q & ~~ Do you want to come in and learn how to improve yourself ~~~~
65. Differences between the adapter and proxy Modes

66. read/write lock

67. Static Locking

68. transaction isolation level

69. Facade mode, class diagram (appearance Mode)

70. How does mybatis map table structures?

71. binary tree traversal

72. Master-slave Replication

73. Differences between MySQL Engines

74. In which area is the static internal class loaded? Method Area

75. Where is the class file loaded after compilation?

76. How can I handle a web HTTP request with a long response time resulting in fewer requests? Use a queue to put requests in a queue when they cannot process so many HTTP requests

How does the Web queue

77. Thread-safe Singleton Mode

78. Fast sorting performance considerations

79. Volatile keyword usage

80. Find the table size or what storage engine is available for data statistics

81. What engine is available for reading, writing, and less?

82. What engine should I use to count multiple tables?

83. How does concurrenhashmap lock size? What should I do if the length changes after a while?

84. Put 1000 apples in 10 baskets. How can I put them so that I can get all the possible numbers?

85. How can I implement A reentrant read/write lock?

86. Have you used NiO?

87. Have you used the concurrent package of Java?

88. Sting S = new string ("ABC") which objects are created on the stack respectively?

89. What are the regions of the Java Virtual Machine?

90. distributed transactions (JTA)

91. threadlocal (both threadlocal and synchonized are used to solve concurrent multi-thread access. However, threadlocal is essentially different from synchronized. Synchronized uses the lock mechanism to allow a variable or code block to be accessed by only one thread at a time. Threadlocal provides a copy of the variable for each thread, so that each thread does not access the same object at a certain time, thus isolating multiple threads from sharing data. Synchronized is the opposite. It is used to obtain data sharing when multiple threads communicate)

92. Java containers (collection, Tomcat is also a container)

93. Binary Search Algorithm

94. What is the difference between MyISAM and InnoDB?

95. What types can redis store?

96. Differences between get and post in HTTP format

97. The wait and ipvy corresponding to the reentrant lock

98. Can redis swap the memory space into the disk (this should be acceptable, but the interviewer did not tell me that it was not acceptable)

99. What should I do if there are too many requests in the Java Thread Pool Based on the cache and fixed length? What if the queue is full? Switch to disk? What about the cache-based thread pool solution?

100. What locks does synchronized apply to the method?

101. Differences between lock and trylock in reentrant locks

102. Will InnoDB be banned from reading a row of data? The read operation is actually a copy.

103. Is redis cached in distributed storage? Are the data stored on different servers duplicated? What about guava cache? Repeated? Data stored on different machines is different

104. Use awk to count the top 10 in an IP File

105. You can directly view the schema info information during table statistics, that is, view the system information of the table.

106. Current MySQL version

107. What help do experienced people in the company provide? (This is usually the case on the boss)

108. What are their advantages over the same fresh graduates?

109. How can my good summary habits help my future work?

110. Atomic class, thread-safe object, Exception Handling Method

111. how to find the number of duplicates (use the hash method to create a 2's 32-bit hash array, each taking an int number, you can locate the location of Hash 2 in the hash array to the power of 32, and set bit to 1 to indicate that it already exists)

112. 0.4 billion URLs to find out the duplicates (considering the insufficient memory, the URLs are allocated to 1000 files through the hash algorithm. Different files will certainly not be repeated, and then find the duplicate)

There are 10 thousand arrays, each of which has 1000 integers, and each array is in descending order. Find the maximum N number, n <1000

113. Underlying Implementation of linkedhashmap

114. What does the system do if no version number is specified for the version number of the class during serialization? What if a field is added?

115. What are the differences between override and overload?

116. How is Java reflection implemented?

Java development engineers who have been working for one or five years can join our Java architecture discussion group: 760940986 (relevant questions and answers, and interview Guidance)
The Group provides architecture video materials for high availability, high concurrency, spring source code, mybatis source code, JVM, big data, netty, and other technical knowledge.
There are also a large number of Daniel in the Group to communicate and answer interview guidance, Q & ~~ Do you want to come in and learn how to improve yourself ~~~~



Summary of first-line Internet enterprise interview questions (helping you get an offer)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.