Amateur grass sharing Java Senior Engineer, interview summary

Source: Internet
Author: User

Before the interview feel oneself in the original company the same work experience of colleagues, whether it is business ability or technical ability can also, but also to their ability to solve problems have certain confidence, just start interview, once appeared embarrassed, obviously know things, is to say not come out, do not know where to say, I think it should be like that ah, how to say, and at one point of their ability to have doubts;

Finally found is not often summed up, not good at summing up, although also notes, but more scattered, not system, or even lost; so start blogging, think this should be a good start it;

1, the JVM structure principle, the GC working mechanism detailed

A: Specific reference: JVM structure, GC working mechanism in detail, when it comes to GC, remember two points: 1, GC is responsible for reclaiming all the memory space without any reference object. Note: Garbage collection is collected without any reference to the object occupied by the memory space instead of the object itself, 2, GC recycling mechanism of two algorithms, a, reference counting method B, the Accessibility analysis algorithm (here, you can see the basic 2 Java object of what period), as for more detailed GC algorithm introduction, You can refer to: Java GC mechanism algorithm

2. The life cycle of Java objects

A: Create phase, application phase, invisible stage, unreachable stage, collection stage, end stage, object space redistribution phase, and more, refer to: Java object life cycle

3, map or HashMap storage principle

A: HashMap is a structure of the array + linked list, the specific reference: HASHMAP implementation principle

4. When a and B fields in a data table are indexed together, will there be an index effect by using a alone or using B alone? (How to use a like query for indexed effects)

A: Look at a, B two fields do the combination index, who in front, who in the back, if a in front, then use a alone will have an index effect, using B alone is not, and vice versa. Similarly, when using a like fuzzy query, if you use only the previous%, then there is an index effect, if you use a double% number match, then no index effect

5, how to consider the time zone conversion problem when the database stores the date format?

A: Using timestamp, reason reference: time zone conversion problems encountered in Java programming

6. What are the methods in the Java object class?

Answer: What are the methods of object

7. HTTP protocol, the difference between get and post

A: Talking about the difference between get and post in HTTP

Iv. threading, design patterns, caching aspects

1, Simpledataformat is non-thread-safe, how to better use and avoid the risk?

Answer: About SimpleDateFormat security time-formatted thread safety issues

2, how to look at the design pattern, and simply say your understanding of the observer pattern

A: 1, the design mode of God Horse 2, the observer pattern and the implementation of the class diagram

3, in the cluster environment, the session how to realize sharing

A: 1, the Java cluster session sharing 2, session multi-server sharing scheme, there is a solution is to use a fixed server dedicated to maintain session, other servers share

4, distributed, cluster environment, how to refresh the cache, how to keep in sync?

A: How does the cache refresh? 1, timed refresh 2, active refresh coverage, each cache frame has its own refresh mechanism, or cache invalidation mechanism, take redis and Ehcache for example, they have their own expiration mechanism, in addition to actively refresh the overlay, just get the corresponding key to cover the data can be

B. How does the cache stay in sync? This redis has its own cluster synchronization mechanism, that is, the replication function, specific reference: based on the Redis distributed cache implementation, Ehcache also has distributed cache synchronization configuration, only need to configure a different server address, reference: Ehcache Distributed Cache synchronization

5, a SQL execution too long time, how do you optimize, from what?

A: 1, to see whether SQL involves multiple tables or subqueries, if any, to see if the business can be split, related fields redundant or merged into a temporary table (Business and algorithm optimization)
2, related to the list of queries, whether it can be divided into table query, the results of a single table query after the field integration
3, if the above two can not operate, not to list query, then consider the corresponding query conditions to do the index. Speed up queries
4, for a large number of tables for the separation of historical tables (such as the trade table)
5, the database master-slave separation, read and write separation, reduce reading and writing for the same table pressure, as for master-slave synchronization, MySQL has its own binlog to achieve master-slave synchronization

6, explain analysis SQL statement, view execution plan, analyze index is used, analyze scan line number, etc.

7. Check the MySQL execution log to see if there are any other issues

Personal understanding: Fundamentally, the query is slow to occupy more than MySQL memory, then you can consider this aspect of the hand

V. Design program Related

The interview will also ask questions about design options, such as

1, your interface service data is truncated, how do you prevent malicious data submission?

A: We can set a business number in the interface transfer parameter, which is used to distinguish whether or not to commit repeatedly. So even if the data is captured, the other party can not distinguish the meaning of each field, then the role of this business number is coming

2, if the server is often down, where do you troubleshoot the problem?

A: This will be left for you crossing added, can comment reply

Interview Skills to supplement these, if you remember anything in addition, if there are other small partners have other suggestions can also be in the comments reply, other interview questions include algorithms, data structure, HTTP protocol and so on, these waiting for everyone to supplement their study, Spring principle, Spring MVC principle asked a lot of, you have time to see the previous interview summary-Advanced Java Engineering (a) and interview summary-Senior Java Engineer (ii).

In a word, the view is still to be seen, but also to learn. Again, the basics are important! Interview skills are also important, or that sentence: I wish you all crossing can find the right job ~ ~

In addition, we advise you not to frequent job-hopping, these knowledge points can be improved is good, do not blindly job-hopping, looking for work is very tired, and no company likes frequent job-hopping staff.

If in doubt, please pay attention to the public number "amateur grass"!

Amateur grass sharing Java Senior Engineer, interview summary

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.