Simple interview questions, popping results (JAVA)

Interview came all the way, we can not talk to a few people left it. Because of the sensibilities, at least we have to talk for ten minutes. Recruitment peak this situation is even worse, you wasted my time. Therefore, more and more organizations will adopt the way of telephone interviews, preliminary screening.

Reduce the difficulty of the subject again and again, only to surprise, HR cried. The following is a simple statistical sample ranging from a few hundred people, can all answer it, no more than 10%.

Oh, there's all wrong! Come see my high score b installed, or you have a high score, a total of 10 points!

1--3-year primary

java foundation

1. What is thread-safe Map

(Answers are ConcurrentHashMap, if you really do not know the answer Hashtable can. ConcurrentSkipListMap a better answer)

Bottom line, do not understand firmly refuse interviews

2, Thread instance you can start method is called multiple times

(Of course not)

if (threadStatus != 0)
throw new IllegalThreadStateException();
复制代码

3, java class Object of which methods are (can be more than 4)

(Java basic understanding of the object, four super easy: hashCode, equals, wait, notify)

4. What is the latest version of Spring

(Answer 4 above, the primary spring will be, why would require spring ah ah ah)

5, switch statement can string it receives

(1.7 on it)

sql

1, plus field will lock table it?

(Basic knowledge of DBMS, the fear of DDL's)

Some differences do not concern other conditions or versions, or using tools such as pt, lock table to answer it ok. Reflect the degree of care treatment database.

2. What is the default MySQL transaction isolation mechanism (not first primary concern, does not affect the development)

3, Mybaits $ and the difference between #

(SSM route will be, SSH, and who also need to dabble route JPA)

Linux Basics

1, how to see the CPU usage

(top)

Basic knowledge of Linux, can quickly integrate into the team. Monitoring interface makes Jack a dull. Devops would be difficult to build a team. Basic understanding of the operating system.

2, how to see the memory usage (free)

3, jstack command is what to do

(Print java stack)

A basic understanding of the jdk

3--5 years Intermediate

java foundation

1. What thread-safe List is?

(CopyOnWriteList, the next best thing Vector)

2, what the java sortable map (natural ordering) is what the underlying structure

(TreeMap- red-black tree / ConcurrentSkipListMap- jump table)

3, volitile keywords What does it mean

Read memory control visible, better able to explain the JMM.

4. What are the thread pool parameters? What are saturated strategy?

(Saturation policy may require lower)

sql

1, how to call the shots from mysql, how to switch?

(Shadow node or a variety of middleware)

2. Why mysql index structure is b + tree (not many people are concerned, does not affect the development)

3, what are the points table component sub-library

(Know the result of at least one, popular are shardingjdbc, mycat, spring dynamic data source, etc.)

Linux Basics

1, how to view the number of java process

(Combination ps, grep, wc use)

ps -ef| grep java|grep -v grep | wc -l

jps | wc -l
复制代码

2, nohup command What does it mean

(Making a background program has been run, not with the session user closes the window closed)

distributed

1, Redis what data structure

(String, list, set, zset, hash, geo, bitmaps, geo, hyperloglog, to know the result of five kinds)

2, tomcat cluster do, how to handle session

(cookie、redis、nginx iphash等)

End

Perhaps you saw the laugh, thinking that insult your intelligence. That is because: elite "little sister the taste of" public number of followers, all industries. Tucao to enjoy it.

Guess you like

Origin juejin.im/post/5cebb17d518825526b29464f