The latest BAT interview questions for Java programmers in 2018

Recently, major companies have started spring recruitment, and many people have already begun to prepare for interviews. I specially summarize the interview questions that junior and intermediate programmers should master. This interview guide is only suitable for junior and intermediate programmers, and does not involve issues such as distribution. Regarding intermediate and advanced programmers, I may write another article later.

For a junior or intermediate programmer, the interview questions not only involve the Java language, but also include many other knowledge, such as basic computer knowledge (data structure, computer network, operating system, etc.), basic knowledge of C language, basic knowledge of Java and some Framework related knowledge, etc. This article covers almost all areas.

  1. computer basics

  2. C language basics

  3. Java Basics

  4. Java Advanced

  5. Java Web

  6. Design Patterns

  7. comprehensive knowledge

  8. tool usage

  9. project related

  10. technology enthusiasm

  11. expression ability

  12. way of thinking

  13. other

Also, I know a lot of people will ask the answer questions about these questions. I have all the answers, but I can't post them directly due to space limitations. I will share the answers to these questions in my next article, thank you for your attention.

 

must keyword

computer basics

data structure

1. What are queues, stacks, and linked lists?

2. What is a tree (balanced tree, sorting tree, B tree, B+ tree, R tree, red-black tree), heap (big root heap, small root heap), graph (directed graph, undirected graph, topology)

3. Similarities and differences between stacks and queues

4. Two storage structures commonly used by stacks

5. Two stacks implement queues, and two queues implement stacks

algorithm

1. What are the methods of sorting?

2. Can write common sorting algorithms, such as quicksort, merge, etc.

3. Time complexity and stability of various sorting algorithms, focusing on quick sorting.

4. Traversal and reverse order of a singly linked list

5. Depth-first search and breadth-first search

6. Minimum spanning tree

7. Common Hash algorithm, hash principle and cost

8. Full permutation, greedy algorithm, KMP algorithm, hash algorithm

9. Consistent Hash Algorithm

operating system

1. Virtual memory management

2. Page feed algorithm

3. Inter-process communication

4. Process synchronization: producer consumer problem, philosopher dining problem, reader writer problem

5. Four necessary conditions for deadlock and ways to avoid it

6. Some basic commands of Linux, such as ls, tail, chmod, etc.

computer network

1. Difference between tcp and udp

2. The whole process of HTTP request and response

3. Common HTTP response codes: 200, 301, 302, 404, 500

4. The difference between get and post

5. The difference between forward and redirect

6, osi seven-layer model

7, tcp/ip four-layer model and principle

8. The difference between TCP and UDP

9. TCP three-way handshake, four closes

10. Lost packets, sticky packets,

11. Capacity control, congestion control

12. Subnet division

13. IPV4 and IPV6

14、HTTPS和HTTP/2

database:

1. Paradigm

2. Database transactions and isolation levels

3. Why do you need locks, lock classification, lock granularity

4. The concept and implementation of optimistic lock and pessimistic lock

5. How to implement paging (Oracle, MySql)

6. Mysql engine

7. MYSQL statement optimization

8. How to solve performance problems when reading data from a large table

9. The function and difference of inner join, left join and right join

10. Difference between Statement and PreparedStatement

11. Index and implementation of index (B+ tree introduction, difference from B tree and R tree

12. What is a database connection pool

Mass data processing

1. Massive log data, how to extract the IP with the most visits to Taobao on a certain day

2. Hundreds of millions of data, count the top N data with the most occurrences

3. 500 million ints, find their median

4. Two files, each storing 5 billion URLs, each URL occupies 64 bytes. The memory limit is 4G, find out the same URL in both files

5. There are 4 billion non-repeating unsigned int integers, which are not sorted. Now give a number, how to quickly determine whether this number is among the 4 billion numbers.

6. Tips: divide and conquer, Hash mapping, heap sort, double bucket partition, Bloom filter, bitmap, database index, mapreduce

C language basics

Constructor, Destructor

1. Constructor and Destructor

2. Why not call virtual functions in constructors

3. Why not throw exceptions in destructors

c++ related

1. The three basic characteristics and five basic principles of object-oriented

2. Memory layout inherited by C++

3. The realization mechanism of C++ polymorphism

4. The difference between new/deletr and malloc/free

other

1. Why use two’s complement?

2. Memory leaks in C language

3. System conversion

4. Write strlen/strcpy/strcmp yourself

5. Differences between C, C++ and Java and their respective advantages and disadvantages

Java Basics

encapsulation, inheritance, polymorphism

1. What is the mechanism for implementing polymorphism in Java, and the difference between dynamic polymorphism and static polymorphism

2. The difference between interface and abstract class, how to choose

3. Can Java implement multiple inheritance and multiple implementations?

4. The difference between Static Nested Class and Inner Class

5. The difference between overloading and rewriting.

6. Is it possible to inherit the String class?

7. Can the constructor be overridden?

8. What is the difference between public, protected and private?

Collection correlation

1. List several common classes in the Collection class library in Java

2. Are List, Set, and Map all inherited from the Collection interface? What are the storage characteristics?

3. Differences and connections between ArrayList, LinkedList and Vector

4. The difference between HashMap and Hashtable, TreeMap and ConcurrentHashMap

5. The difference between Collections and Collections

6. Other collection classes: treeset, linkedhashmap, etc.

exception correlation

1. The difference between Error and Exception

2. Types of exceptions, what are runtime exceptions

3. The difference between final, finally and finalize

4. In try-catch-finally, if it returns in catch, will the code in finally still be executed? What is the principle?

5. List more than 3 RuntimeExceptions

6. Simple principle and application of exception handling mechanism in Java

other

1. The difference between String and StringBuffer and StringBuilder

2. The difference between == and equals

3. The role of hashCode and the relationship between the equals method

4. What is the difference between Input/OutputStream and Reader/Writer

5. How to convert between character stream and byte stream?

6, switch can use those data types

7. Four references to Java

8. Serialization and deserialization

9. Regular expressions

10. The difference between int and Integer, what is automatic boxing and automatic unboxing

Java Advanced

Multithreading

1. The difference between a process and a thread

2. The difference and connection between parallelism and concurrency

3. Synchronous and asynchronous

4. What is the difference between the implementation of multi-threading

5. What is a daemon thread?

6. How to stop a thread?

7. What is thread safety?

8. The difference between synchronized and lock

9. When a thread enters a synchronized method of an object, can other threads enter other methods of the object?

10. Do you use run() or start() to start a thread?

12. The difference between wait and sleep

13. The difference between notify and notifyAll

14. The role of the thread pool

15. Thread pool related classes in Java

JVM underlying technology

1. The concept of gc, if A and B objects are circularly referenced, can they be GC?

2. How does jvm gc determine whether an object needs to be recycled? What are the ways?

3. Can GC be actively triggered in Java?

4. The memory structure of JVM, the difference between heap and stack

5. Generation of JVM heap

6. What is memory overflow in Java and what does it have to do with memory leaks?

7. Java's class loading mechanism, what is parent delegation

8. Class loading method of ClassLoader

I

1. The difference between NIO, AIO and BIO

2. Common usage of IO and NIO

other

1. What algorithms does hashcode have?

2. The basic concept of reflection, whether reflection can call private methods

3. The concept of generics in Java

4. JVM startup parameters, -Xms and -Xmx

5, the realization of the agency mechanism

6. String s = new String("s"), several objects are created.

Java Web

Servlet

1. The difference between JSP and Servlet, the concept of Servelt.

2. Servlet life cycle

3. The working principle of session in Servlet and the way to set expiration time

4. What are the application scenarios of filter in Servlet?

5. Dynamic include and static include of JSP

6. Common configurations and functions in web.xml

7, Servlet thread safety issues

MVC framework

1. Introduce several commonly used MVC frameworks

2. What is MVC

3. The implementation process of requests in Struts

4. The difference between Spring mvc and Struts mvc

5. Service nested transaction processing, how to roll back

6. The difference and execution order of interceptors and filters in struts2

7. The realization principle of struts2 interceptor

http related

1. The difference between session and cookie

2. What is the principle of session implementation in HTTP request?

3. Can Session be implemented if the client forbids cookies?

4. The difference between get and post in http

5. The difference between redirect and forward

6. Status codes returned by common web requests. What do 404, 302, 301, and 500 stand for?

SSH related

1. The difference between Hibernate/Ibatis/MyBatis

2. What is OR Mapping

3. Hibernate's caching mechanism, first-level and second-level caches

4. What are the benefits of using Spring, the core concept of Spring

5. What is AOP and IOC, and what is the implementation principle?

6. The initialization process of spring bean

7. Spring's transaction management, several ways of Spring bean injection

8. Four dependency injection methods of spring

container related

1. What is a web server and what is an application server

2. What are the commonly used web servers?

3. The difference between Tomcat and weblogic

web security

1. What is SQL injection and how to avoid it.

2. What is XSS attack and how to avoid it

3. What is CSRF attack and how to avoid it

Dynamic proxy

1. The concept of dynamic proxy in Java

2. Implementation of dynamic proxy in Java

encoding problem

1. Commonly used character encoding

2. How to solve the problem of Chinese garbled characters

other

1. The way of parsing XML, and its advantages and disadvantages.

2. What is ajax and how does Ajax solve cross-domain problems

Design Patterns

1. Talk about the design patterns you know or are familiar with

2. Several implementations of Singleton to achieve a thread-safe singleton.

3. Difference between Factory Pattern and Abstract Factory Pattern

comprehensive knowledge

1. Please introduce the whole process of an http request. The more comprehensive the description, the better

2. What happens when you enter www.taobao.com in the browser address bar and hit enter

tool usage

1. Do you know what git/svn does? have you used it

2. Do you know what maven/gradle does? have you used it

3. What IDE do you usually use and why?

4. What browser do you usually use and why?

5. What is the operating system of the usual development machine?

6. Will it be developed on Linux? Is there any common command in Linux?

project related

1. Please briefly introduce your project

2. What role do you play in this project

3. Have you done the technical selection of this project?

4. What research and comparisons have been done to select a certain technology

5. What was the biggest problem encountered in this project? How did you solve it.

6. Whether performance, security and other issues have been considered in the project

technology enthusiasm

1. The latest version of the current Java

2. lambda expressions in Java 8

3、Java8的stream API

4. Modularization of Java 9

5. Local variable type inference in Java 10

6、Spring Boot2.0

7、HTTP/2

8. Can you overturn the wall? Do you know the principle of overturning the wall?

9. What book have you been reading recently?

expression ability

1. Can you briefly introduce yourself?

2. Can you describe your impression of Hangzhou? Summarize it in three sentences.

way of thinking

1. How to estimate how many software engineers there are in Hangzhou

2. What is the most impressive article you have read recently?

3. There are several points of view in this article, which one do you most agree with and which one do you disagree with the least?

other

1. How do you feel about working overtime?

2. Do you have any questions for me (the interviewer)?

The above are the BAT interview questions collected by the editor. The answer to the interview cannot be explained in one or two sentences. Below I have recorded some videos about the BAT interview for you. If you are interested, you can join the group: 697579751 to get it for free. I hope to be able to do your best in the interview process that you are about to deal with.

Summarize:

Through the above BAT Java interview questions, when you are reading the article, think about it yourself, can you answer all those questions? Do you feel that you want to improve your skills further? In April, the last month of the golden month of interviewing, can you seize the opportunity? When you have an appointment with technical difficulties and bottle disease, can you solve it? If you can't solve it, it proves that you are on the road of development, and you still need to continue to study hard.

Here, I wish the friends who will be interviewed in April to pass the test smoothly!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324482062&siteId=291194637