The basic concept

  • The difference between heap and stack in an operating system
  • What is annotation-based aspect implementation
  • What is an object/relational mapping integration module
  • What is Java’s reflection mechanism
  • What is ACID
  • The relation and difference between BS and CS
  • The difference between cookies and sessions
  • What is the difference between fail-fast and Fail-safe
  • The difference between GET and POST requests
  • The difference between Interface and abstract classes
  • What are the advantages of IOC
  • The difference between IO and NIO, NIO advantages
  • What new features does Java 8 / Java 7 offer us
  • What are race conditions? Let me give you an example.
  • What are the differences between the JRE, JDK, JVM, and JIT
  • What technologies are there to implement the various parts of MVC? How to do that?
  • RPC communication is different from RMI
  • What is a Web Service
  • Introduction to the JSWDL development kit. JAXP, JAXM interpretation. SOAP, UDDI,WSDL interpretation.
  • What are the main functions of the WEB container? List some common WEB container names.
  • Can a “.java “source file contain multiple classes (not inner classes)? What are the restrictions
  • Tell me briefly what you know about classloaders. Whether a class loader has ever been implemented
  • Explain AOP (Aspect oriented Programming)
  • Briefly describe the life cycle of servlets and related methods
  • Please briefly explain how Ajax works and how to implement it
  • Briefly describe the main functions of Struts
  • What is n-tier architecture
  • What is CORBA? What is it for?
  • What is a Java Virtual machine? Why Java is called a “platform Independent Programming language”
  • What is a regular expression? What is it for? Which package uses regular expressions for pattern matching
  • What is Lazy Loading?
  • What is tail recursion and why do we need tail recursion
  • Inversion of Control and Dependency Injection

The keyword

finalize

  • What is finalize() method
  1. When is the Finalize () method called
  2. What is the purpose of finalization
  3. Difference between final and Finalize
  4. final
  • What are the uses of the final keyword
  1. Where can the final and static keywords be used? What do they do
  2. Final, finally, Finalize
  3. What is the difference between Final, Finalize and finally?
  • Can be assigned to static final types at run time
  1. When the final keyword is used to modify a variable, the reference is immutable or the referenced object is immutable
  2. What does it mean when a class is declared final
  3. Throws, throw, try, catch, finally stand for what meanings

How many modifiers does Java have? What are they used to modify

volatile

  • What is the practice with the volatile modifier
  • What is a volatile variable? What is the difference between volatile variables and atomic variables
  • What guarantees do volatile variables provide? Can a non-atomic operation be turned into an atomic operation
  • Can I create volatile arrays?

What are the characteristics of transient variables

When is super used

Public static void what about static public void

Public static void main(String args[])

Name the difference between the public, private, protected, and non-write scopes

Is sizeof a Java keyword

static

  • Static class and non-static class
  • What does the static keyword mean? Can override a private or static method in Java
  • What are the features of static typing
  • Why does the main() method have to be static? Can you declare the main() method non-static
  • Whether calls to non-static methods can be made from within a static method
  • When are static variables loaded? Compile time or run time? When static blocks load
  • Can member methods access static variables? Why can’t static methods access member variables

switch

  • What types of data can expressions in switch statements be
  • Whether the switch works on byte, whether it works on long, and whether it works on String
  • What’s the difference between a while loop and a do loop

The operator

  • What is the difference between the & and & operators?
  • What’s the difference between a = a + b and a += b?
  • Logical operators (&, |, ^) and conditional operators, &&, | |)
  • What does 3*0.1 == 0.3 return? True or false?
  • Float f = 3.4; Is that correct?
  • short s1 = 1; s1 = s1 + 1; What’s wrong with that?

The data structure

Primitives

  • How is Primitives different from Wrappers
  • Briefly describe the size of the nine basic data types and their encapsulation classes
  • Which takes up more memory, int or Integer? What’s the difference between int and Integer? When is the parseInt() function used
  • What are the default values for float and double
  • How to round decimals to two decimal places
  • Can a char variable hold a Chinese character? Why

Type conversion

  • How do I convert bytes to long
  • How do I convert byte to String
  • How do I convert numeric characters to numbers
  • Can we cast int to a byte variable? What happens if the value is greater than the byte range
  • Can A double be assigned to a variable of type long without casting
  • What is a type down cast

An array of

  • How to weigh whether to use an unordered array or an ordered array
  • How do I tell if an array is null or empty
  • How do I print an array? How do I print duplicate elements in an array
  • What’s the difference between Array and ArrayList? When should you use Array instead of ArrayList
  • Array and linked list data structure description, their time complexity
  • Does an array have a length() method? String does not have a length() method

The queue

  • What are queues and stacks? List the differences
  • What is the BlockingQueue
  • Describe the use and differences of ConcurrentLinkedQueue LinkedBlockingQueue.

Storage performance and features of ArrayList, Vector, LinkedList

String

StringBuffer

  • What’s the difference between ByteBuffer and StringBuffer

HashMap

  • How does HashMap work
  • What is the internal data structure
  • How to determine the size of a HashMap table? What is loadFactor? How does this capacity change? What problems will this change bring?
  • What is the data structure that HashMap implements? How to implement
  • The difference between HashMap and HashTable and ConcurrentHashMap
  • Traversal mode and efficiency of HashMap
  • Differences between HashMap, LinkedMap, and TreeMap
  • How do YOU decide whether to use HashMap or TreeMap
  • What if the size of the HashMap exceeds the capacity defined by the Load factor
  • Is HashMap thread safe? What maps are used concurrently, and what are their internal principles, such as storage, Hashcode, capacity expansion, default capacity, etc.

HashSet

  • What’s the difference between HashSet and TreeSet
  • How does a HashSet work internally
  • How does WeakHashMap work?

Set

  • Elements in a Set cannot be repeated, so what is the way to distinguish between repeated and not? Equals == or equals()? What’s the difference?
  • TreeMap: What tree is used to implement TreeMap? TreeMap, HashMap, LindedHashMap. How do TreeMap and TreeSet compare elements when sorting? How does the sort() method in the Collections utility class compare elements?
  • TreeSet: How to reverse sort a TreeSet that is already built.
  • What is enumsets

The Hash algorithm

  • The role of Hashcode
  • This section describes the consistent Hash algorithm
  • Is it possible that two objects that are not equal have the same Hashcode? What happens when two objects have the same Hashcode? How do I get a value object
  • Why do I need to override hashCode when OVERRIDING equals? What is the difference between Equals and hashCode
  • What does a.hash code () do? What does it have to do with A. als(b)
  • Where are the hashCode() and equals() methods important
  • Object: What are the common methods of Object? Object class HashCode equals design principle? Why does Sun design this way? An overview of the Object class
  • How do I automatically complete all hashCode and equals implementations for subclasses in a parent class? What are the pros and cons of this.
  • Can I use random numbers in hashCode ()?

LinkedHashMap

  • What is the difference between LinkedHashMap and PriorityQueue

List

  • What are the characteristics of the List, Set and Map interfaces when accessing elements
  • Whether List, Set, and Map inherit from the Collection interface
  • What are the different ways to traverse a List
  • LinkedList
  1. LinkedList is a one-way list or a two-way list
  2. What’s the difference between LinkedList and ArrayList
  3. Describe the concepts of Collections, Interfaces, Implementations in Java. What is the difference between LinkedList and ArrayList?
  4. Which is faster when inserting data: ArrayList, LinkedList, or Vector?
  • ArrayList
  1. The default size of ArrayList and HashMap is majority
  2. ArrayList vs. LinkedList. When is ArrayList used?
  3. The difference between an ArrayList and a Set?
  4. ArrayList, LinkedList, Vector
  5. How is ArrayList implemented, the difference between ArrayList and LinkedList
  6. How does ArrayList expand capacity
  7. What’s the difference between Array and ArrayList? When is it better to use Array
  8. Name the storage performance and features of ArraList,Vector, LinkedList

Map

  • Map, Set, List, Queue, Stack
  • What are the different collection views provided by the Map interface
  • Why does the Map interface not inherit from the Collection interface

Collections

  • This section describes the Collection FrameWork in Java. What are the basic interfaces of the collection class framework
  • What is the Collections class? What’s the difference between Collections and Collections? Collection, Map implementation
  • What are the best practices for collection class frameworks
  • Why does Collection not inherit from Cloneable and Serializable interfaces
  • Name some best practices for using Collections in Java?
  • Differences between legacy classes (HashTable, Vector) and existing classes in Collections

What are B+ trees, B- trees, list the actual usage scenarios.

interface

  • What are the Comparator and Comparable interfaces? List the differences

object

Copy (clone)

  • How to implement object cloning
  • Deep copy is different from shallow copy
  • How do deep and shallow copies implement activation mechanisms
  • When writing the clone() method, there is usually one line of code. What is it

To compare

  • How is the “==” operator different from equals when comparing objects
  • If I want to override the equals method of an object, what else do I need to consider
  • Two objects with the same value (x.equals(y) == true) can have different hash codes

The constructor

  • What is a constructor chain
  • The order in which the constructor is called when the object is created

Immutable object

  • What is an immutable object
  • Why Strings in Java are Immutable
  • How do YOU build immutable class structures? What are the key points
  • Can I create an immutable object that contains a mutable object

How do I sort a set of objects

methods

  • Whether the constructor can be overridden
  • Can methods be static and synchronized
  • Abstract method can be static, native, and synchronized
  • Which parameter passing types are supported in Java
  • An object is passed as a parameter to a method, either by value or by reference
  • When an object is passed as a parameter to a method that changes the object’s properties and returns the changed result, it is passed by value or by reference
  • Can we override the main() method
  • What if the main method is declared private

GC

concept

  • What is GC? Why GC
  • When does it lead to garbage collection
  • How does GC work
  • What is old, new and permanent
  • How many ways does GC work? How to configure
  • When is an object GC? How do you tell if an object is alive
  • System.gc() Runtime.gc() does what? Is GC execution guaranteed
  • Can the garbage collector reclaim memory right away? Is there any way to proactively notify the virtual machine for garbage collection?
  • When do Minor, Major, Young, and Full GC occur
  • The realization principle of garbage collection algorithm
  • If a reference to an object is set to NULL, does the garbage collector immediately free the memory occupied by the object?
  • What are the best practices for garbage recycling

What are the GC collectors

  • What is the rationale behind the garbage collector?
  • What is the difference between a serial collector and a throughput collector
  • Differences between Serial and Parallel GC
  • Features and differences between CMS collector and G1 collector
  • The working process of CMS garbage collector
  • What does a complete GC flow look like in the JVM? How does the target get promoted to the old age
  • Throughput first and response first garbage collector selection

GC policy

  • For a practical scenario, choose a GC strategy
  • Does garbage collection occur in the JVM’s permanent generation

Collection methods

  • The principle and characteristics of mark clearing, mark sorting and copy algorithms? What are they used for
  • If you were asked to optimize your collection methods, what would you think

JVM

parameter

  • Name some of the major JVM parameters you know
  • -xx :+UseCompressedOops

ClassLoader

  • What are the Java class loaders
  • How does the JVM load bytecode files

Memory management

  • How many partitions are there in the JVM memory, and what does each partition do
  • How does an object survive and migrate between these parts from creation to destruction
  • Explain the use of stack, heap, and method area in memory
  • Which parameter in the JVM is used to control the thread stack size
  • This section describes the memory allocation and reclamation policies
  • Briefly reorder, memory barriers, happen-before, main memory, working memory
  • Is there a memory leak in Java? Please give an example
  • This section describes soft reference, WeakReference and virtual reference in Java
  • What is a memory-mapped cache

Jstack, jstat, jmap, jConsole

What is the maximum heap memory for 32-bit and 64-bit JVMS? For 32-bit and 64-bit JVMS, is the length of a variable of type int the majority?

How do I determine whether the JVM is 32-bit or 64-bit using a Java program

Does the JVM itself maintain the cache? Whether objects are allocated in the heap, the operating system’s heap, or the JVM manages the heap itself

When can stack memory overflow occur

What is the parental delegation model

multithreading

The basic concept

  • What is a thread
  • Advantages of multithreading
  • Several ways to achieve multithreading
  1. Runnable or Thread
  • What is thread safety
  1. Vector, SimpleDateFormat are thread-safe classes
  2. What Java prototype is not thread-safe
  3. Which collection classes are thread-safe
  • What are busy loops in multithreading
  • How do I create a thread
  • There are several ways to write multithreaded programs
  • What are thread-local variables
  • What is the difference between threads and processes? How do processes communicate with each other? How do threads communicate with each other
  • What is False Sharing in multi-threaded environments?
  • What are the similarities and differences between synchronous and asynchronous, and when are they used separately? For example

Current

  • ConcurrentHashMap and Hashtable
  • ArrayBlockingQueue CountDownLatch
  • What is the concurrency of ConcurrentHashMap

What’s the difference between CyclicBarrier and CountDownLatch? What are the internal principles and usage of each

The use of the Semaphore

Thread

  • To start a thread, call the run() or start() method? What is the difference between the start() and run() methods
  • When the start() method is called, the run() method is executed. Why not just call the run() method
  • What’s the difference between the sleep() method and the wait() method of an object that suspends a thread
  • What does yield do? What’s the difference between the sleep() method and yield() method
  • How do I stop a thread in Java
  • Why are the stop() and suspend() methods not recommended
  • How do I share data between two threads
  • How do I force a thread to start
  • How do I suspend a running thread for a period of time
  • What is a thread group and why is it not recommended in Java
  • How do you call wait? If block or loop? why

The life cycle

  • What are the different thread lifecycles
  • What is the difference between a thread state, BLOCKED and WAITING
  • Draw a life cycle state diagram for a thread

What does ThreadLocal do, how does it work, and what should you care about when using it

ThreadPool

  • What is a thread pool? Why use it
  • How do I create a Java thread pool
  • ThreadPool usage and advantages
  • What happens when the thread pool queue is full when a task is submitted
  • What is the difference between newCache and newFixed? Explain the principle. What are the meanings of the various arguments to the constructor, such as coreSize, maxsize, etc.
  • Thread pool implementation strategy
  • There are several ways to close a thread pool. What are the differences
  • What is the difference between submit() and execute() methods in a thread pool?

Thread scheduling

  • What is the thread scheduling algorithm used in Java
  • What is context switching in multithreading
  • What do you understand about thread priorities
  • What is Thread Scheduler and Time Slicing?

Thread synchronization

  • Name a thread synchronization method that you know of
  • What is the principle of synchronized
  • What’s the difference between synchronized and ReentrantLock
  • When can volatile replace synchronized
  • There are three threads, T1, T2, T3. How do you ensure that they are executed in sequence? How to ensure that T2 is executed after T1 and T3 after T2
  • What happens when a thread within a synchronized block throws an exception
  • Whether other threads can access synchronized method B of an object after one thread has entered synchronized method A of the object
  • What is the difference between using synchronized to modify static and non-static methods
  • How do I create a synchronized collection from a given collection

The lock

  • What is the Lock interface to the Java Concurrency API? What are the advantages over synchronization
  • The difference between Lock and Synchronized? What are the advantages of the Lock interface over synchronized blocks
  • What is ReadWriteLock?
  • What is the use of the locking mechanism
  • What are Optimistic Locking? How to implement optimistic locking? How to avoid ABA problems
  • Explain the following terms: reorder, spin lock, bias lock, lightweight lock, reentrant lock, fair lock, unfair lock, optimistic lock, pessimistic lock
  • When should reentrant locks be used
  • Describe the level method lock, object lock and class lock
  • What is the difference between live locks and deadlocks in Java?
  • What is a Deadlock? What causes thread deadlocks? How do I ensure that N threads can access N resources without causing deadlocks
  • The difference between a deadlock and a live lock, the difference between a deadlock and starvation
  • How do I check if a thread has a lock
  • How to implement distributed locking
  • What lock-free data structures are there, and how do they work
  • What application scenarios can read/write locks be used in

Executors? The difference between Executor and Executors

What is a Java Thread Dump and how do I get it

How do I get a thread stack in Java

Name three best practices for using threads in Java

How do you handle non-catching exceptions in threads

Examples of using multithreading in a real-world project. What are some common problems you encounter in multi-threaded environments? How did you solve it

Name methods related to thread synchronization and thread scheduling

There are 3 sockets in the program, how many threads are needed to process

If you have a third-party interface that has multiple threads calling to retrieve data, it is now limited to a maximum of 10 threads calling it at the same time every second

How do I find which thread is using the most CPU time on Windows and Linux

How do I ensure that the thread on which the main() method is located is the last thread to terminate a Java program

Many threads (possibly different machines) need to wait for coordination between each other to complete some work. How to design this coordination scheme

You need to implement an efficient cache that allows multiple users to read, but only one user to write, in order to maintain its integrity. How would you implement that

abnormal

The basic concept

  • What is the difference between Error and Exception
  1. What is UnsupportedOperationException
  2. What is the same between NullPointerException and ArrayIndexOutOfBoundException
  • What are checked exceptions and what are run-time exceptions
  • How are run-time exceptions different from normal exceptions
  • Describe a Runtime exception that you see most often.

finally

  • How is the finally keyword used in exception handling
  1. If the method returns a result before executing a finally block, or if the JVM exits, does the code in the finally block still execute
  2. Is there a return in try, finally executed? Will the code in finally {} immediately after the try be executed, and when, before or after the return
  3. In what cases do finally statements not execute

Throws throws what is the difference?

What situations have you met in OOM? How did you pull it off?

SOF What situations have you encountered?

Why do you think there are checking exceptions in Java when we can handle errors with RuntimeExceptions

What should YOU be aware of when creating your own exception class

The cause of the null pointer exception

How to understand the Handle or declare principle

How do I use JUnit to test a method exception

What’s wrong with not writing code in a catch block

Have you ever custom implemented an exception? How to write the

What is an exception chain

Can an exception be thrown in a try block

JDBC

  • There are several ways to connect to a database through JDBC
  • Describes the basic steps of JDBC database operations
  • How do transactions work in JDBC
  • What is a JdbcTemplate
  • What is a DAO module
  • How to improve the performance of reading data when using JDBC to operate a database? How to improve the performance of updated data
  • List five JDBC best practices that you should follow

IO

  • File
  1. What methods are defined in the File type to create a level 1 directory

What methods are defined in the File type to determine if a File exists

  • flow
  1. What flows can be used to improve read and write performance
  2. There are several types of flows in Java
  3. The JDK provides some abstract classes for each type of stream to inherit from
  4. What I/O stream is used for text file operations
  5. What flows are used for reading and writing various basic data types and strings
  6. What type of I/O stream can you specify a character encoding for
  • serialization
  1. What is serialization? How to implement Java serialization and considerations
  2. Serializable vs. Externalizable
  • Socket
  1. What is the socket option TCP NO DELAY
  2. Which layer of the TCP/IP stack does the Socket work on
  3. TCP, UDP distinction and Java implementation
  • Some best practices for IO
  • What is the difference between a direct buffer and an indirect buffer?
  • How to read and write ByteBuffer? What is the byte order in ByteBuffer
  • The number of bytes stored in the buffer when n characters are entered from the keyboard using system.in.read (buffer)
  • How to use Scanner Class tokenization

Object-oriented programming (OOP)

  • To explain polymorphism, encapsulation, cohesion and coupling
  • The realization principle of polymorphism
  • What are encapsulation, inheritance, and polymorphism
  • What are the principles of object encapsulation?
  • class
  1. How to get the class object of a class
  2. The difference between Overload and Override. Can overloaded methods be differentiated by return type?
  3. Name a few best practices for method overloading in Java
  • An abstract class
  1. The difference between abstract classes and interfaces
  2. Whether an abstract class can have a static main method
  3. Whether an abstract class implements an interface
  4. Can an abstract class inherit a concrete class?
  • Anonymous Inner Class

Can anonymous inner classes inherit from other classes? Whether the interface can be implemented

  • The inner class
  1. There are several inner classes
  2. Can an inner class reference a member of its containing class (the outer class)
  3. Explain why inner classes were introduced in Java? There are also anonymous inner classes
  • inheritance
  1. What is the difference between Inheritance and Aggregation
  2. What’s the difference between inheritance and composition
  3. Why can a class be single-inherited and an interface multi-inherited
  4. There are two classes, B inherits from A and C inherits from B. Can we convert B to C? So C = (C) B
  5. If class A inherits from class B and implements interface C, and a variable of the same name is defined in class B and interface C, what can happen
  • interface
  1. What is an interface
  2. Interface Whether an interface is inheritable
  3. Why use interfaces instead of directly using concrete classes? What are the advantages of interfaces

The generic

  • What problem do generics exist to solve
  • Common characteristics of generics
  • Whether a List can be converted to a List

Utility class

  • The calendar
  1. Purpose of Calendar Class
  2. How do I get an instance of a calendar class in Java
  3. Explains some important methods in the calendar class
  4. What is the GregorianCalendar class
  5. What is the SimpleTimeZone class
  6. What’s the Locale class
  7. How do I format a date object
  8. How to add an hour to a Date object
  9. How to convert the string YYYYMMDD to a date
  • Math

What does math.round () do? Math.round(11.5) equals what? What is math.round (-11.5)?

  • XML
  1. How many forms does an XML document definition take? What are the essential differences between them? What are some ways to parse AN XML document? What’s the difference between DOM and SAX parsers?
  2. How Java parses XML
  3. How to solve Chinese problems when parsing XML files with JDOM? How to parse
  4. What aspects of XML technology did you use in your project? How to implement

A dynamic proxy

  • Describe several implementation methods of dynamic proxy and describe their advantages and disadvantages

Design patterns

  • What are Design Patterns? What design patterns have you used? For what occasion
  • What business design patterns do you know?
  • Which design patterns can increase the scalability of the system
  • The singleton pattern
  1. Besides singletons, what other design patterns have you used in production?
  2. Write the Singleton Singleton pattern
  3. What is the double check for singleton mode
  4. How to create thread-safe Singleton
  5. What is the singleton pattern of a class
  6. Write out three singleton pattern implementations
  • Adapter mode
  1. What is the adapter pattern? When to use
  2. What was the difference between the adapter pattern and the broker pattern
  3. What is the difference between adapter mode and decorator mode
  • When to use the premium mode
  • When to use composite mode
  • When to use the visitor pattern
  • What is the template method pattern
  • Describe an example of a design pattern that conforms to the open and close principle

Open question

  • Summarize the features of Web programming in one sentence
  • How does Google return search results to users in less than a second
  • Which dependency injection method do you recommend, constructor injection or Setter injection
  • Trees (binary or otherwise) form the basis of many common data structures. Describe some of these data structures and when they can be used
  • How is a feature designed
  • How do you find problems when online systems suddenly become incredibly slow
  • What kind of project doesn’t fit the framework
  • How does Sina Weibo reach subscribers
  • A quick overview of what happens in a Java Web application from the time the browser enters the URL to the time it gets to the request screen
  • Talk about SSH integration
  • How to safely modify the same row of data under high concurrency
  • How to realize the booking system of 12306.cn and how to ensure that the tickets will not be oversold
  • How to optimize the site performance
  • I talked about the server architecture I had participated in designing
  • Consider a solution to implement countDownLatch in a distributed environment
  • Consider a scenario for designing an adaptive local cache that can control the overall size of the cache
  • What has been the most difficult technical challenge in your career
  • How to write a design document, what is the content
  • What is the capital O? Just a couple of examples
  • How do I consider some design principles in programming, such as open and close principles, and how do they apply to my work
  • Explain the patterns and characteristics of network applications
  • Design an online document system, documents can be edited, how to prevent multiple people to edit and update the same document at the same time
  • What is the working mechanism of data connection pooling
  • How do I get the highest frequency of words in a file
  • Describe your most common programming style
  • If you had the chance to redesign your product, what would you do
  • How to build a HIGH availability system
  • How can I boot without entering a user name and password
  • How to implement file upload and download in a Java-based Web project
  • How to implement a seckill system to ensure that only a few users can buy an item.
  • How to achieve load balancing and what algorithms can be used to achieve it
  • How to design a shopping cart? Think about taobao shopping cart how to achieve
  • How to design a set of high concurrent payment scheme, how to design the architecture
  • How to design and maintain 100W long connections
  • How to avoid browser caching.
  • How to prevent cache avalanche
  • If the two systems AB are interdependent, how can they be removed
  • What can I do if someone creates an illegal connection maliciously
  • How to design this function if there are billions of whitelists that need high concurrent queries during the day and update once at night
  • If the system uses large integers (beyond the long range), design a data structure to store such large numbers and an algorithm to add large integers.
  • If you want to design a graphics system, please design basic graphic element (Point, Line, Rectangle, Triangle) of simple implementation
  • If you were asked to implement a concurrency safe linked list, what would you do
  • What is the difference between an application server and a WEB server? How does the application server monitor performance? What application server optimization techniques have you used
  • What should be considered in the architecture of large sites
  • Have you dealt with online problems? How to handle memory leaks, high CPU usage, and unresponsive applications
  • What books have you read recently and what impressed you most
  • Describe common refactoring techniques
  • What version management tools do you use? What’s the difference between a Branch and a Tag
  • Have you ever looked at what anti-patterns exist
  • What front-end optimization techniques have you used
  • How to analyze Thread dump
  • How do you understand the concepts of Joinpoint, Pointcut, Advice, Introduction, Weaving, and Aspect in AOP
  • How do you deal with memory leaks or stack spills
  • What JVM parameters do you apply online
  • How to improve system QPS and throughput

knowledge

  • Explain what the MESI protocol is (Cache consistency)
  • Talk about the REACTOR model
  • What new features does Java 9 bring
  • Java vs. C++, simple principles and applications of exception handling in C++ or Java
  • A brief introduction to the Tomcat structure and its classloader process
  • What is virtual memory
  • Explain the SOLID principle
  • Describe briefly what you know about test Driven development (TDD)
  • CDN implementation principle
  • What’s the difference between Maven and ANT
  • What diagrams are commonly used in UML
  • Linux
  1. There are several IO models in Linux.
  2. What kernel parameters do you care about in Linux
  3. View the last five lines of the file with a single command in Linux
  4. Which Linux commands do you use
  5. Output the running Java process with a single command
  6. What command is used to determine if there is a Tomcat instance running on the machine
  • What is the N+1 problem
  • What is the PaxOS algorithm
  • What is restful? What do you understand restful
  • What is the ZAB protocol
  • What is a Domain model? What is the difference between the anaemic Domain model and the rich Domain model
  • What is Domain Driven Development?
  • Introduce you to the Web Service framework in the Java domain
  • What is the difference between Web Server, Web Container, and Application Server
  • What is the difference between MicroServices and Monolithic Applications
  • Describe the functions of cookies and sessions, their differences and application scope, and how sessions work
  • What Continuous Integration and Static Code Analysis tools do you use
  • A brief description of database Normalizations
  • What are the principles of KISS,DRY,YAGNI
  • Principle of distributed transaction, advantages and disadvantages, how to use distributed transaction?
  • How to do a unique sequence number in a cloth cluster
  • network
  1. What is the encryption method of HTTPS and the whole encryption and decryption process
  2. The difference between HTTPS and HTTP
  3. Implementation principles of HTTP connection pooling
  4. HTTP clustering scheme
  5. Nginx, Lighttpd, Apache three mainstream Web server differences
  • Have you seen some of the framework code
  • What are the considerations for persistence layer design? What persistence layer frameworks have you used
  • What is a numerical boost
  • Can you explain the Richter’s substitution principle
  • How do you test an app? Know which test frameworks
  • What are the common programming protocols at the transport layer? And describe their characteristics

Programming problem

Calculate overtime pay

Overtime less than 10 hours will be paid 1.5 times the hourly rate. Overtime of 10 hours or more will be charged 4 yuan per hour. Tips :(work 26 days a month, 8 hours a day)

  • Calculate monthly salary of 1000, 9 hours overtime overtime pay
  • Calculate 2500 monthly salary, 11 hours overtime overtime pay
  • Calculate 1000 monthly salary, 15 hours of overtime overtime pay

Sell things

A shopping mall sells red apples and green apples. (Red apples 5 yuan /, green apples 4 yuan /).

  • Simulate an incoming stock. 200 red apples and 200 green apples each.
  • Simulate a sale. Buy ten red apples and ten green apples. Every apple sold needs to be counted.

Tip: An apple is a separate entity.

Date extract

There is a time string: 2008-8-8 20:08:08. Write a regular expression that matches it, and write Java code to extract the hours and seconds following the date: 20:08:08

thread

  • Design 4 threads, two of which increase j by 1 each time and the other two decrease j by 1 each time. Write the program.
  • Use Java to write a multithreaded program, such as write four threads, two plus 1, two on a variable minus one, output
  • Wait-notify writes a piece of code to solve the producer-consumer problem

digital

  • Determine how many primes there are between 101 and 200 and print all primes
  • Let’s do the most efficient way to figure out what 2 times 17 is
  • There are 100 million numbers, two of which are repeated, and find it quickly, in time and space
  • 200 million randomly generated, unordered integers, find the middle size of the value
  • Find the 10 smallest numbers in a billion
  • Find the sum of the natural numbers from 1 to 100 million, such as 286 divided into 2, 8, 6, such as 1 to 11 divided into the sum of the numbers => 1 +… Plus 9 plus 1 plus 0 plus 1 plus 1
  • A number that is exactly equal to the sum of its factors is called a perfect number. For example, 6=1+2+3. Program to find all completions up to 1000
  • All elements in an array appear three times and only one element appears once find that element
  • A ball dropped from a height of 100 meters and bounced back to half of its original height after each landing; And when it lands again, how many meters does it travel on the 10th landing? How high is the 10th bounce?
  • Find the sum of primes between 100 and 1000
  • Take the average of the sum from 1 to 100
  • O s = a + a + aaa + aaaa + aa… The value of a, where a is a number. For example, 2+22+222+2222+22222(a total of 5 numbers added), the addition of several numbers is controlled by the keyboard. Take the sum from 1 to 100
  • Take the primes from 1 to 40 and put them in an array
  1. Displays the number placed in the group
  2. Find the number [5]
  3. Delete the number [9], and then display the deleted number [9]
  • There are 3n+1 numbers, 3n of which are repeated, and only 1 of which is not repeated.
  • There is a set of numbers 1.1.2.3.5.8.13.21.34. Write a program that inputs any number and gives you the first five numbers that follow the same pattern as the previous set
  • Computes the factorial of the specified number
  • The development of Fizz Buzz
  • Given an array of N integers, find the missing integers
  • A sorted array finds all combinations of two numbers that add up to m
  • Decompose a positive integer into its prime factors. For example, enter 90 and print 90=233 * 5.
  • Print out all the “daffodil number”, the so-called “daffodil number” is a three-digit number, the cube sum of the numbers is equal to the number itself. For example, 153 is a “daffodil number” because 153=1 to the third power +5 to the third power +3 to the third power
  • Swap the values of the two variables in place
  • Find the median of a 4-byte integer
  • Find the square root of an integer
  • Fibonacci

network

  • Java Socket programming, read server a few characters, and then write local display

reflection

  • What function does reflection provide?
  • How is reflection implemented
  • Where is the reflection mechanism used
  • The difference between class. forName and ClassLoader in reflection
  • What are the three ways reflection can create an instance of a class
  • How do I call an object’s methods through reflection
  • How do I get and set the value of an object’s private field through reflection
  • Pros and cons of reflection mechanisms

The database

  • Write a JDBC Oracle program, and achieve data query

algorithm

  • 50 people sit in a circle and, on the count of three or a multiple of three, ask who the rest are and what their original position was
  • To achieve an elevator simulator
  • Write a bubble sort
  • Write a half search
  • Randomly generate 20 characters that cannot be repeated and sort them
  • Write a function that passes in two ordered arrays of integers and returns an ordered array of integers
  • Write code to remove an element while iterating through an ArrayList
  • Classical problem: have a pair of rabbit, from be born after 3 months every month all give birth to a pair of rabbit, little rabbit child grows to after 4 months every month again give birth to a pair of rabbit, if rabbit all die, ask the total number of rabbit of each month is how many
  • Josephine ring game

regular

  • Write a regular expression that matches the IP address
  • Write a regular expression to determine if a string is a number

string

  • Write a method that takes in a filename and a string and counts the number of times that string appears in the file.
  • Write a program to find all combinations of strings and check if they are palindromic strings
  • Write a string inversion function and type abcde to convert to edCBA code
  • Small game, invert the words in the sentence
  • Convert the GB2312 encoded string to isO-8859-1 encoded string
  • Write code to count the number of characters “A” in A given text. Using iterative and recursive methods respectively
  • Write a function that intercepts a string. The input is a string and the number of bytes, and the output is a string truncated by bytes. But to ensure that Chinese characters are not cut in half, such as “I ABC” 4, should be cut into “I AB”, input “I ABC han DEF”, 6, should be output as “I ABC” rather than “I ABC+ han half”
  • Given two files containing word lists (one per line), programmatically list the intersections
  • Prints all permutations of a string
  • Convert a keyboard input number into Chinese output (for example: 1234567, output: 12234,56767)
  • In the process of Web application development, we often encounter the output of a certain code character, such as from GBK to ISO8859-1, how to output a certain code character string

The date of

  • Calculate the difference between the two dates