Java Senior Software Engineer Written Test-Momentum Node

1. Data structure and algorithm foundation

·Talk about several common sorting algorithms and their respective complexity.

·Write a bubble sorting algorithm in Java

·Describe the chain storage structure.

·How to traverse a binary tree?

· Invert a LinkedList.

· Use Java to write a recursive traversal of all files under the directory.

Two, Java basics

·The difference between interface and abstract class?

·What are the types of exceptions in Java? How to use each?

·What are the commonly used collection classes? For example, how to sort List?

·How about the internal implementation of ArrayList and LinkedList? The difference between them and their advantages and disadvantages?

·What is the memory overflow? Please give an example?

· What is the difference between == and equals?

·The role of hashCode method?

·What is NIO? What kind of scene is applicable?

·HashMap implementation principle, how to ensure the thread safety of HashMap?

·JVM memory structure, why do we need GC?

·NIO model, the difference between select/epoll, the principle of multiplexing

·How many bytes a character occupies in Java, expand and ask how many bytes int, long, double occupies

·What are the ways to create an instance of a class?

·The difference between final/finally/finalize?

·The difference between Session/Cookie?

·The difference between String/StringBuffer/StringBuilder, expand and ask their realization?

· Servlet life cycle?

·How to allocate a continuous 1G memory space with Java? What needs attention?

·Java has its own memory recovery mechanism, but why is there still a memory leak problem?

·What is java serialization and how to realize java serialization? (write an example)?

·String s=new String("abc"); How many String Objects have been created?

Three, JVM

· The basic structure of the JVM heap.

·What are the garbage algorithms of JVM? The basic process of CMS garbage collection?

·What are the common startup parameters of JVM that can be adjusted, and how many are described?

·How to check the memory usage of JVM?

·Whether the Java program will overflow or leak? Give a few examples.

·What are your commonly used JVM configuration and tuning parameters? What are the roles?

·JVM memory structure?

·Commonly used GC strategy, when will YGC be triggered and when will FGC be triggered?

Guess you like

Origin blog.csdn.net/weixin_49543720/article/details/110392599