Go Java Interview summary interview for nearly one months __java

Source: Internet
Author: User
Tags data structures garbage collection throwable try catch

This article is in the study summary, welcome reprint but please indicate the origin: http://blog.csdn.net/pistolove/article/details/46753275


Preface

Plan to change a job, nearly one months interviewed a lot of companies, the following will be some interview experience and thinking to share. Another school recruit is about to start, for students in the school to provide some experience for reference, hoping to find a satisfactory job.

Just started the interview of several companies, is a variety of blows, is a crazy ask, the results of the answer to the problem of a few, began to their own confidence caused a certain impact, and later adjusted, and restored to a state of full confidence. On the one hand, work experience is limited, on the other hand, there is no systematic review. The latter occupies the main position. So how to review good technical points is necessary to find a good job (but also a large part of the luck component in it). For fresh students, because of the limited skills in school, so in the beginning of the interview after several companies, the feeling of shock is very normal, at this time must not lose heart, from each interview to sum up their own shortcomings, not to make up for their knowledge, then you will find that the job search is not so difficult, Ask to ask about those things.

I do not specifically say which company's interview, that is not good for the company. First of all, summarize some of the most important points of knowledge; Then, analyze some of the knowledge points, and finally, list the face questions and the pen questions that can be recalled. Hope to help you.


key Knowledge

Because of the Java developers I interviewed for Java, the key things to understand are:

JVM memory management mechanism and garbage collection mechanism (basically every interview will ask, must be thorough)

JVM Memory tuning (understand what's going on, generally do more with the project process)

Design pattern (familiar with common design patterns of the application scene, will draw class diagram, it is not possible to recite a few also useful)

Multithreading (ask each time, including thread and process, thread state, thread concurrent operation, etc., need to be reviewed in depth)

Java Collection Class Framework (understanding the relationships and differences between frames, HASHMAP, ArrayList, HashSet, and so on, where the HASHMAP storage mechanism is almost always asked)

Java Exception handling mechanisms (classification of exceptions, common exceptions, Try catch finally used)

JVM running mechanism (understanding how the JVM works)

Linux Basics (There are some requirements for Linux in the interview written test, it is advisable to build a Linux virtual machine, and practice the commonly used commands)


data Structures and algorithms

The common sorting algorithm does not say, need to understand its principles and write code, and time space complexity also need to know

Queues, stacks: need to understand their access structure and can be used in some scenarios

Binary tree: Tree traversal, tree depth, hierarchical output, balanced binary tree, reverse print tree, etc.

Linked list: Reverse order, merge two orderly linked list, determine whether the linked list is also ring, the chain list of the reciprocal k elements, etc.

String: KMP algorithm, dynamic programming (this is the focus, need to understand the dynamic programming, common problems are: the longest palindrome string, solve the longest common substring, etc.)

Mass data processing: Now a lot of big companies will ask a large number of processing, so need to master common processing methods, such as Bit-map, divide and conquer, hash map, etc., you can see the relevant articles Baidu, deepen understanding


Database related (database is the focus of the interview, each company will ask)

Basic database CRUD operations familiar with the ability to write the required SQL statements from a table

transactions, zero tables, indexes, table locks, row and column locks, views, stored procedures, and so on, should be thoroughly understood

Internet companies deal with a large amount of data, so it is necessary to database optimization and large data processing to understand and familiar with

It is recommended to look at the books and materials related to non relational databases such as NoSQL and Redis.


Open source Framework

Open source frameworks like SSH are rarely asked during the interview process, but it is also necessary to understand how SSH works and how to use it. Interview is the basis of the main study, so more inclined to study the data structure, algorithms, databases, Java basics, and so on. Therefore, if you have limited time, you can focus on basic knowledge of learning and review, if you have ample time, you can learn and review the open source framework related knowledge. For the open source framework: It is best to look at the source code, the advantages of their own is very large.


Personal advice

The above detailed list and analysis of the recent interview process problems, because the time is long, can not all recall, but the overall difference is not big. For an interview, some personal advice:

(1) The mentality should put well, cannot be anxious. Do not see people get an offer, they do not have the heart pressure, in fact, who can find the work, to see satisfaction is not satisfied, so worry is no use.

(2) The body is very important. Do not stay up all night to review, study, the body to bring down the candle. Keep a good sleep.

(3) Good at summarizing the interview problems. Every written test, after the interview, need to be summed up, will not be their knowledge points must be clear, if not clear, next time there may be asked. In fact, the process of looking for a job is to accumulate knowledge of the process, so good at summarizing is very important.

(4) Do not blindly delivery resumes. Do not see large companies on delivery, do not send their own do not want to go to the city, that is in the blind toss, the company even if you, you do not go, you might as well put the time in their own places to go.

(5) Review needs to continue. Because the memory will be forgotten, so review process, need to be repeated, while understanding one side of memory, to close your eyes can see the knowledge of the architecture.


Finally, hope to find a job friends can find a satisfactory job. The following specific list of the common knowledge of the interview, for your reference, I hope to help you.

The main detailed knowledge point commonly used algorithm inspects

Bubble sort

Quick Sort

Insert Sort

Hill sort

Merge sort

Heap Sort

Bucket sort

Dynamic programming

Longest common substring

The longest palindrome string

Maximum k value of array

The sum of the maximum contiguous array of numbers

Left rotation string

String matching algorithm: KMP algorithm

Two-point Search

linked list

Reverse order of single linked list

Two sequential single linked list merging

Two single linked lists intersect

The node at the intersection

Number of reciprocal K of single linked list

Single linked list sorting

Stacks and queues

Design a stack that contains the Min function

Two queue implementation stack

Two stack implementation queues

An array implementation stack and queue

tree

Pre-order, middle-order, subsequent traversal

To find the depth of the two-fork tree

Traversing a binary tree by hierarchy

Determine if the binary tree is a complete binary tree

Determine if the binary tree is mirror symmetry

To determine whether two trees are equal

Number of Cattleya

Out Stack Order

Number of two-forked trees consisting of n nodes

Parenthesis

Triangular division of convex polygons

Design Patterns

What design patterns are in Java source code

http://www.iteye.com/news/18725

Common design Pattern Class diagram

Http://blog.sina.com.cn/s/blog_8cc6ff5c0101d4cp.html

Examples of common design patterns:

Http://www.jb51.net/article/27973.htm

Database

Writing the CRUD statements of a database

Database optimization strategy, how to optimize

Massive data optimization

Transaction

Lock Classification in transaction

Transaction attributes

database table Locks

Row and column Locks

Temporary tables

Index

Storage space

View

Linux Common commands (best in real combat)

Http://www.php100.com/html/webkaifa/Linux/2009/1106/3485.html

Build Servers on Linux

Http://www.cnblogs.com/dudu/archive/2012/12/09/linux-apache-git.html

Common network ports

Http://www.360doc.com/content/11/1202/09/8209768_169068538.shtml

Familiarity and understanding of Nosql, Redis, etc.

Http://www.yiibai.com/redis/redis_quick_guide.html

processing of massive data

Bit-map, divide-and-conquer, hash mapping, distributed processing (Hadoop), trie tree, double-layer bucket sorting, etc.

Java Basics

HashMap storage mechanism (important, must SEE)

Set, Map differences

Set, List difference

The difference between Arraylist and LinkedList

String, Stringbufer, StringBuilder difference

The difference between HashSet and Linkedhashset

HashMap, TreeMap, Linkedhashmap

Familiar with the Java Collection Class frame diagram

HashMap, ArrayList, StringBuffer, string and other source of knowledge

Threads and processes

Characteristics of threads

The state of the thread

Implementation of multithreading concurrency

How threads are Created

Use of thread pools

Java scopes

Use of final, static, native, and other special keywords

The process of Java passing by value

Refactoring and overloading

Abstract classes and Interfaces

Use of internal classes: Anonymous inner class, static inner class, etc.

Java multithreading concurrency, the realization of producer consumers

The process of Java connecting to a database

JVM Memory management and storage mechanism

http://blog.csdn.net/lengyuhong/article/details/5953544

JVM Garbage collection mechanism, garbage collection algorithm

http://jbutton.iteye.com/blog/1569746

JVM Load class process

Http://www.cnblogs.com/sunada2005/p/3577799.html

JVM memory tuning

Http://www.cnblogs.com/jackyrong/archive/2010/01/21/1653163.html

http://blog.csdn.net/cutesource/article/details/5907418

Framework related

Familiarity with the framework: SSH (rarely asked in the interview process, like JSP, Servlet basic Don't Ask)

Spring Framework composition, AOP, IOC, used design patterns

Hibernate operating mechanism, the use of caching, the best look at the source code

Familiarity and understanding of JavaScript and jquery

Java in io, NIO

The first major difference between Java NiO and Io is that IO is stream oriented and NIO is buffer-oriented. Java io-oriented streaming means that one or more bytes are read from the stream each time, until all bytes are read, and they are not slowed down anywhere. In addition, it cannot move data back and forth in the stream. If you need to move data that is read from the stream before and after, you need to first cache it to a buffer. Java NiO has a slightly different buffer-oriented approach. The data is read to a buffer it handles later, and can be moved back and forth in the buffer when needed. This increases the flexibility in the processing process. However, you also need to check whether the buffer contains all the data you need to work with. Also, make sure that when more data is read into the buffer, do not overwrite data that has not been processed in the buffer.

Io flows include byte streams and character streams:

BYTE stream: The corresponding abstract class is inputstream (input stream) and OutputStream (output stream). FileInputStream, FileOutputStream

Character streams: the corresponding abstract class is reader (input stream) and writer (output stream). BufferedReader, InputStreamReader, StringReader

classification and structure of exceptions in Java

Exception classes in Java, including built-in exception classes and custom exception classes, are inherited directly or indirectly to the Java.lang.Throwable class. In the Java.lang package, the Throwable class has two direct subclasses: the error class and the exception class, and the error class and its subclasses describe the internal and resource exhaustion errors of the Java Run-time System. There is no better way to make this mistake than to notify the user and then try to safely terminate the program. The hierarchy of the exception class is divided into two branches: one branch is derived from RuntimeException, and another branch contains exception classes except the RuntimeException class.

run-time exceptions, non- run-time exceptions

Run-time Exceptions: RuntimeException classes and their subclass exceptions, such as NullPointerException, Indexoutofboundsexception, ClassCastException, and so on, these exceptions are not checked for exceptions, In the program, you can choose to capture or not to handle. These exceptions are usually caused by program logic errors, and the program should avoid the occurrence of such anomalies from the logical point of view as much as possible.

Non-run-time Exceptions: Exceptions other than RuntimeException, which belong to the exception class and its subclasses. An exception that must be handled from a procedural syntax point of view, and no handler cannot be compiled. such as IOException, SqlException, and user-defined exception exceptions.

Dynamic agent mechanism

A dynamic proxy can provide access to another object while hiding the concrete facts of the actual object. The proxy typically implements the interface of the actual object it represents. The agent can access the actual object, but delay the realization of some functions of the actual object, the actual object realizes the actual function of the system, and the proxy object hides the actual object to the customer. The customer does not know whether it is dealing with an agent or with a real object. Dynamic proxies consist primarily of the following roles: A Dynamic proxy class (hereinafter referred to as a proxy class) is a class that implements the list of interfaces that are specified at run time when the class is created, and that class has the behavior described below. An agent interface is an interface implemented by a proxy class. A proxy instance is an instance of a proxy class. Each proxy instance has an associated invocation handler object that implements the interface Invocationhandler. Invokes the Invoke method of the calling handler that will be assigned to the instance through a method on the proxy instance of one of the proxy interfaces, passing the proxy instance, identifying the Java.lang.reflect.Method object that calls the method, and an array of type object containing the arguments. The calling handler handles the encoded method call in the appropriate way, and the result it returns is returned as the result of a method call on the proxy instance.

Try Catch finally use

1. Finally will always be carried out to, System.exit (0); Except for this being carried out.
2. Even if there is return in try, it is the first execution of the statement after the return, not immediately return, but to execute finally in the statement.

3. When the try and finally are returned, the return result in the finally will only come back.
4. The value in finally cannot affect the result value that is about to be returned in the try.
Note: If finally there is no return in a try or catch, then the result of the statement will be opened to a new memory space, and the result can be stored directly in the memory space. Therefore, the value in finally cannot affect the return result in a try or catch.

Static members , non-static members

(1) The static members (variables and methods) of the class belong to the class itself, allocating memory when the class loads, can be accessed directly through the class name; non-static members (variables and methods) belong to the object of the class, so the memory is allocated only when the object of the class is generated (an instance of the class is created) and then accessed through the object (instance) of the class.

(2) access to its non-static members in a static member of a class is an error because static members of a class already exist when a non-static member of a class does not exist, and of course there is an error in accessing something that does not exist in memory.

The principles that an abstract class follows:

(1) The abstract keyword can only modify classes and methods, and cannot modify fields.

(2) Abstract classes cannot be instantiated (object instances cannot be created with the New keyword) and can only be inherited.

(3) An abstract class can contain attributes, methods, construction methods, initialization blocks, inner classes, enumeration classes, and normal classes, like ordinary methods, must be implemented, and variables can be initialized, uninitialized, but not initialized, and then assignable in the abstract class or manipulate the variable (which can only be changed in subclasses).

(4) Abstract methods in abstract classes (methods with the abstract keyword added) cannot be implemented.

(5) Classes that contain abstract methods must be defined as abstract classes.

Extensions: The difference between an abstract class and an interface:

(1) The interface is public, it cannot have private methods or variables, is used for others to use, and abstract classes can have private or private variables.

(2) AbstractClass represents an inheritance relationship in the Java language, and a class can only use one inheritance relationship at a time. However, a class can implement multiple interface to achieve multiple inheritance. The interface also has the function of identifying (there are no methods, such as remote interfaces) and data sharing (where variables are all constants).

(3) In the AbstractClass can have their own data members, there can be a ABSTARCT member method, and in interface, only static can not be modified data members (that is, must be static final, However, no data members are generally defined in interface, and all member methods are by default public abstract types.

(4) The design concepts reflected by AbstractClass and interface are different. In fact, AbstractClass said the "is-a" relationship, Interface said is "has-a" relationship.

(5) Implement the interface must implement all the methods defined in the interface, and the implementation of abstract classes can selectively rewrite the need to use the method, the general application, the most top-level is the interface, and then the abstract class implementation interface, and finally to the specific class implementation. Abstract classes can have non-abstract methods. There is no implementation method in the interface.

(6) The variable defined in the interface defaults to the Publicstatic final and must be given an initial value, so the implementation class cannot be redefined or changed. The variables in an abstract class are friendly by default, and their values can be redefined in subclasses, or they can be assignable in subclasses.



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.