This blog is my column "Java interview review notes" an index
(content continuously updated !!!) (a follow-up study went on to add)
column includes a Java about the interview I learned in the course of many pay- notes and a summary of
the course which contains
- Mu class network "Fun Java concurrency utilities, proficient JUC, become complicated by generalist"
- Mu class network "Java Concurrency core knowledge succinctly"
- Mu class network "wins the Java interview -Offer train"
- Mu class network "High Road -Java face questions Collection"
- Mu class network , "the interviewer Java source code and system manufacturers succinctly Zhenti"
- Pull hook net "Java source 34 interview Zhenti and stresses"
- Cattle off network "Java developers Kong full resolution high-frequency interview questions."
- Time Geeks "Geeks core technology of the time -Java 36 stresses"
I hope this column, apart from helping to build my own knowledge, acquire knowledge of the interview, but also to help and I did not learn in school, like many manufacturers want to find something practical work of students
Quick access to see here ->
- Concurrent Programming articles
- Java Basics
- Talk about the understanding of the Java platform
- String is how to achieve? What are the important methods?
- Object-oriented can explain it? What are the characteristics?
- In Java Exception and Error What is the difference?
- int and Integet What is the difference?
- Strong references, soft references, weak references, phantom references What is the difference?
- Abstract classes and interfaces What is the difference?
- JDK, JRE and JVM differences and connections What?
- Algorithms articles
- Biography articles
Concurrent Programming articles
You have to understand the core knowledge of Java Concurrency
Content includes ->
- The difference between processes and threads
- Java relations processes and threads
- How many ways to implement threads have?
- Implement Runnable and Thread class inherits Which way is better?
- Two calls a thread start () method What happens? why?
- Since the start () method calls the run method, why we choose to call the start method instead of calling the run method it?
- How to stop a thread?
- How to deal with non-interruptible blocking
- Thread, which has several state? What is the life cycle?
- The two threads alternately print program (0-100) of parity
- What is a producer-consumer model
- Handwriting producer-consumer model
- Why wait method requires the use of a synchronization code in the blocks, and need not sleep
- Why thread communication method of wait, notify, notifyAll is defined in the Object class? The slepp method is defined in the Thread class?
- wait method is part of the Object object, then call Thread.wait () happens
- How to choose to use notify or notifyAll
- After notifyAll all the threads will again snatch lock, if a thread snatch failure - failure how to do?
- suspend and resume a thread can be used to block it? why?
- wait / notify, sleep similarities and differences
- The difference between yield and sleep
- During the join, which state the thread is a thread?
- The difference between an ordinary thread and thread guard
- Do we need to set up a daemon thread to thread?
- Whether run method can throw an exception?
- How to handle exceptions Global
- What is multi-threaded context switch
- Why will bring multi-threaded performance issues?
- When will lead to intensive context switch
- Effect and singletons application scenarios
- Eight kinds of writing singleton and related knowledge
- Achieved in which the single work best mode embodiment
- Talk about what is Java Memory Model
- Deadlock on how much you know?
Talk about what is Java Memory Model
Content includes ->
- Why Java memory model?
- Discrimination JVM memory architecture, Java memory model, Java object model
- JVM memory structure
- Java object model
- Java Memory Model
- Reordering
- Example shows:
- What is reordering
- Reordering benefits
- Three cases reordering
- Visibility
- What is the visibility of the issue
- Why the visibility problem
- Relations JMM main memory and the local memory
- What happens-before rule?
- What is volatile
- When should I use volatile
- volatile role
- Volatile relationship with the synchronized
- Atomicity
- What is atomicity
- Atomic operation in which Java
- The process of generating the object is not an atomic operation?
Thoroughly get to know the deadlock Past and Present
Content includes ->
- What deadlock, what harm?
- Write an example of a deadlock
- Case I: Deadlock inevitable
- Case II: two Account Transfer
- Case III: people of multiple transfers
- What conditions must be met deadlock
- How to position Deadlock
- What strategy to solve the deadlock problem there?
- How do online deadlock
- Common repair strategy
- Dining philosophers problem
- Problem Description
- Code demonstrates
- A variety of solutions
- Take a fork in order to change the implementation of a philosopher
- How to avoid deadlocks project
Singleton get through the interview eight kinds of writing singleton
Content includes ->
- Hungry man type (static const) (Available)
- Starving formula (static code block) (available)
- Lazy man's (thread safe) (Not available)
- Lazy man's (thread-safe) (not recommended)
- Lazy man (lock, thread safe) (Not available)
- Double-check (Interview recommended use) (Available)
- Static inner classes (recommended) (Available)
- Enumeration (recommended) (available) (the production of the best written)
ThreadLocal How much do you know?
Direct link to
content included ->
- ThreadLocal typical application scenarios
- Scenario 1: Each object is a thread needs exclusive
- Scene 2: The current user information needs to be shared by all methods within threads
- The role of two ThreadLocal
- Initialization method using two kinds of scenes
- The benefits of using ThreadLocal
- Thread of the relationship with the ThreadLocal
- ThreadLocal important method
- ThreadLocal Precautions
- Why ThreadLocal memory overflow will occur?
How to solve the memory overflow
I have to say "lock" thing
Content includes ->
- Lock Interface
- Brief introduction
- Why Lock
- Methods Introduction
- Visibility guarantee
- Lock Category
- Optimistic and pessimistic locking
- Why is the birth of a non-exclusive synchronization locks (optimistic locking)
- What is the optimistic and pessimistic locking
- typical example
- Cost comparison
- scenes to be used
- Reentrant and non-reentrant lock lock
- Fair and unfair lock lock
- What is fair and unfair
- Why should there be unfair lock
- Fair situation (for example to ReentrantLock)
- Unfair situations (for example to ReentrantLock)
- Special case
- Comparative advantages and disadvantages of non-equity and equity
- Shared locks and exclusive locks
- What is a shared lock and the exclusive lock
- The role of read-write lock
- Read-write lock rules
- ReetrantReadWriteLock specific usage
- Read lock to jump the queue strategy
- Relegation strategy
- Spin locks and blocking locks
- Why spin locks
- Spin lock shortcomings
- Code demonstrates
- Spin lock scenario applies
- Interruptible and non-interruptible lock lock
- Optimistic and pessimistic locking
- How to optimize lock when writing code and improve concurrency
Java Basics
Talk about the understanding of the Java platform
Content includes ->
- Java salient features
- Java features
- Java code execution
- Java is resolved to run it?
String is how to achieve? What are the important methods?
Direct link to
content included ->
- String is how to achieve? What are the important methods?
- String is how to achieve?
- Common method
- Spread
- Why use the final modification of type String?
- What equals and '==' is the difference?
- String and StringBuilder, StringBuffer What is the difference?
- The String intern () method What is the meaning?
- String type in the JVM how to store? What are optimizing compiler done?
Object-oriented can explain it? What are the characteristics?
Direct link to
content included ->
- Object-oriented thinking
- About Packaging
- About inheritance
- About polymorphism
- About coverage
- About overloaded
In Java Exception and Error What is the difference?
Content includes ->
- concept
- Exception Category
- NoClassDefFoundError and ClassNotFoundException What is the difference?
- Level between Throwable, Error and Exception
- Analysis of improper exception handling
- Case number one
- analysis
- Case II
- analysis
- finally the relevant test sites
- finally the case will not be executed
- finally resulting impact on the implementation of
int and Integet What is the difference?
Direct link to
content included ->
- What is the difference int and Integet
- The original Java data types and corresponding packaging 8
- Java's automatic entry box
Strong references, soft references, weak references, phantom references What is the difference?
Abstract classes and interfaces What is the difference?
Direct link to
content included ->
- concept
- the difference
- How interfaces and abstract classes choose? It was used under what circumstances?
- JDK8 why the default type of method appeared in the interface?
JDK, JRE and JVM differences and connections What?
Direct link to
content included ->
- concept
- Differences and relations
- Java is platform-independent is how to achieve?
- Java language is compiled or interpreted language?
Algorithms articles
Action figure plus the code easy to get top ten ranking algorithm
Direct link to
content included ->
- Compared with the classification of various types of sorting algorithms
- Selection Sort
- Select the one-way
- two-way choice
- Insertion Sort
- Followed by exchange
- In turn covered
- Bubble Sort
- Conventional bubble
- Optimization bubbling
- Shell sort
- Merge sort
- Quick Sort
- Ordinary quicksort
- Randomized quick sort
- Dual quick sort
- Three fast sorting
- Heapsort
- Priority Queue
- Heap place
- Counting Sort
- Bucket sort
- Radix Sort