Basic concepts The difference between heap and stack in an operating system what is an annotation-based aspect implementation what is an object/relational mapping integration module what is Java’s reflection mechanism what is ACID The connection and difference between BS and CS The difference between Cookie and Session What is the difference between Fail-fast and Fail-safe? What is the difference between GET and POST requests? What is the difference between Interface and Abstract? What are the advantages of IOC? NIO Benefits 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 JRE, JDK, JVM, and JIT? What technologies are used to implement various parts of MVC? How to do that? RPC communication and RMI difference what is Web Service (Web Services) JSWDL development package introduction. 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 limitations? Tell me briefly what you know about classloaders. Have you implemented a class loader? Explain what AOP is (aspect oriented programming) briefly describe the life cycle of servlets and related methods briefly describe the principle and implementation steps of Ajax briefly describe the main functions of Struts, what is n-layer architecture, what is CORBA? What is a Java virtual machine? Why is Java called a “platform independent programming language” and what are regular expressions? What is it for? Which package uses regular expressions to implement pattern matching for what is lazily loaded and what is tail recursion, When will finalize() be called? When will Finalize () be called Finalization is final and Finalize. Finalization is final and finalize. What are the differences between final, Finally, Finalize what is the difference between Final, Finalize and Finally? Can a class be declared final at run time when an assignment to a static final type uses the final keyword to modify a variable? Throws, throw, try, catch, and finally How many modifiers do Java have? What are they used to modify

volatile

What is the practice with volatile modifiers what are volatile variables? What is the difference between volatile and atomic variables what guarantees do volatile variables provide? Can you make a nonatomic operation atomic? Can you create a volatile array? 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

A static class is a non-static class. Can I override a private or static method in Java? What are the characteristics of static types? Why should main() methods be static? Can I declare main() as non-static Can I make calls to non-static methods from inside a static method and when are static variables loaded? Compile time or run time? Do member methods have access to static variables? Why can’t static methods access the member variable switch

What kind of data can an expression in a switch statement be? Can switch operate on byte, can switch operate on long, can switch operate on String? What’s the difference between a while loop and a DO loop

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’s the difference between 30.1 = = 0.3 will return? True or false? Float f = 3.4; Is that correct? short s1 = 1; s1 = s1 + 1; What’s wrong with that? Data structures * Primitives

How can Primitives be different from Wrappers? Describe the size of the nine basic data types, and which of their wrapper classes, int or Integer, takes up more memory? What’s the difference between int and Integer? When is the parseInt() function used for float and what is the default value for double how to round decimals and keep two char variables after the decimal point can store a Chinese character, why type conversion

How to convert Bytes to long How to convert Byte to String How to convert numeric characters to numbers Can we cast ints to byte variables? If the value is greater than the byte range, what happens can you assign a double to a long without casting what array is a type downcast

How do you weigh whether to use an unordered array or an ordered array how do you tell if an array is null or empty how do you print an array? How to print duplicate elements in an Array What’s the difference between an Array and an ArrayList? When should arrays and linked list data structures be described instead of arrays and lists? Is there a length() method for the respective time complexity of arrays? String has no length() method queue

What is a queue and what is a stack? List the differences between them. What is BlockingQueue? Storage performance and features of ArrayList, Vector, LinkedList

String

StringBuffer

What’s the difference between ByteBuffer and StringBuffer HashMap

How does a HashMap work what is the internal data structure of a HashMap how does the table capacity of a HashMap be determined? 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, HashTable and ConcurrentHashMap Traversal method and efficiency of HashMap, LinkedMap and TreeMap How to choose a HashMap or TreeMap Is a HashMap thread-safe if the size of the HashMap exceeds the capacity defined by the Load factor? What maps are used concurrently, and what are their internal principles, such as storage, hashcode, capacity expansion, default capacity, etc. HashSet

What is the difference between a HashSet and a TreeSet? How does a HashSet work internally? How does a 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 Hash algorithm is EnumSet

Is it possible for two unequal objects to have the same Hashcode? What happens when two objects have the same Hashcode? Why do I need to override hashCode when OVERRIDING equals? What are the similarities and differences between equals and hashCode? What is the importance of the hashCode() and equals() methods Object: What are the common methods of Object? Object class HashCode equals design principle? Why does Sun design this way? How do all implementations of HashCode and equals auto-complete for subclasses in parent classes? 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, Set, Map What are the characteristics of accessing elements List, Set, Does a Map inherit from the Collection interface what are the different ways to iterate over a List LinkedList LinkedList is a one-way List or a two-way List How is LinkedList different from ArrayList Describe Java We Implementations of the concept of Collections, Interfaces. What is the difference between LinkedList and ArrayList? Which is faster when inserting data: ArrayList, LinkedList, or Vector? ArrayList The default size of ArrayList and HashMap is the difference between most ArrayLists and LinkedLists. The difference between an ArrayList and a Set? ArrayList, LinkedList, Vector What’s the difference between ArrayList and LinkedList what’s the difference between ArrayList and ArrayList? When is it better to use Array to name the storage performance and feature maps of ArraList,Vector, LinkedList

What are the different Collection views provided by the Map interface? Why doesn’t the Map interface inherit from the Collection interface, Collections

This section describes the Collection FrameWork in Java. What are the Collections classes? What’s the difference between Collections and Collections? Why does Collection not inherit from Cloneable and Serializable interfaces what are the best practices for using Collections in Java? The differences between legacy classes (HashTable, Vector) and existing classes in Collections what are B+ trees and B- trees, listing the actual usage scenarios.

interface

What are the Comparator and Comparable interfaces? List the objects they differ from

Copy (clone)

How to clone objects How to clone objects How to clone objects How to clone objects How to clone objects

If you want to override equals on an object, which two objects have the same value (x.equals(y) == true) but can have different hash codes

What is a constructor chain the order in which the constructor is called when creating an object immutable object

What is immutable object? Why are Strings immutable in Java? How to construct immutable class structures? What’s the key point is can you create an immutable object that contains mutable objects how do you sort a set of objects

methods

Can the abstract method be static and synchronized at the same time? Can the abstract method be static and native? When an object is passed as a parameter to a method, the method can change the properties of the object and return the changed results. So is this value passing or reference passing can we override main() what happens if main is declared private GC

concept

What is GC? Why do you have a GC when does it lead to garbage collection how does a GC run old and new and what are the permanent areas There are several ways to have a GC? How do you configure when an object is GC? How to tell if an object is alive system.gc () Runtime.gc() does something? Can the garbage collector immediately reclaim memory? Is there any way to proactively notify the virtual machine for garbage collection? When does the Minor, Major, Young, and Full GC occur? Does the garbage collector immediately free the memory of the object if its reference is set to NULL? What are the best practices for garbage collection? What are the GC collectors

What is the rationale behind the garbage collector? What is the throughput between serial and Parallel GC? What is the throughput between SERIAL and Parallel GC What is the process? How can objects be promoted to the old throughput-first and response-first garbage collector selection GC policy

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

The principle and characteristics of mark clearing, mark sorting and copy algorithms? If you want to optimize the collection method, what are the ideas for the JVM

parameter

-xx :+UseCompressedOops :+UseCompressedOops

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

Which parts of the JVM’s memory are divided into? What is the function of each section? How does an object live and move between these sections from creation to destruction? What is the use of the stack, heap, and method area in memory? Memory barriers, happen-before, main memory, working memory Are there memory leaks in Java? How to use 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 are the advantages of Thread multithreading how many ways to implement multithreading are Runnable or Thread what is thread-safe Vector, SimpleDateFormat is a thread-safe class what Java archetypes are not thread-safe what collection classes are thread-safe what are busy loops in multithreading how do you create a thread how do you write multithreaded programs what are thread-local variables what’s the difference between a thread and a process? How processes communicate, how threads communicate 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:

ConcurrentHashMap and Hashtable ArrayBlockingQueue The use of CountDownLatch what is the concurrency of ConcurrentHashMap what is the difference between a 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? When you call start(), you execute run(). Why can’t you just call run()? Sleep () and wait() can both suspend a thread. How to stop a thread in Java How to share data between two threads How to force a thread to start How to suspend a running thread for a while what is a thread group, Why is it not recommended to use how you call wait in Java? If block or loop? Why the life cycle

ThreadLocal is a thread lifecycle state that is BLOCKED from being WAITING. It is a thread lifecycle state that is BLOCKED from being WAITING

ThreadPool

What is a thread pool? What is the difference between newCache and newFixed when the ThreadPool queue is full when submitting a task? Explain the principle. There are several ways to close a thread pool. What is the difference between the submit() and execute() methods in a thread pool? Thread scheduling

What are the Thread scheduling algorithms that are used in Java what is context switching in multithreading what is your understanding of Thread priority what is Thread Scheduler and Time Slicing Thread synchronization

What is the difference between synchronized and ReentrantLock? Where can volatile replace synchronized? There are three threads, T1, T2, T3, How do you ensure that they are executed in sequence? What happens when A thread in A block throws an exception after entering an object’s synchronized method A, Can other threads access the synchronized method of this object? B What is the difference between using synchronized modifier static methods and non-static methods

What is the Lock interface to the Java Concurrency API? What’s the difference between Lock and Synchronized? What are the advantages of a Lock interface over a synchronized block? What is the use of Optimistic Locking mechanism? How to implement optimistic locking? How to avoid ABA problems explain the following terms: resort, spin lock, biased lock, lightweight lock, reentrant lock, fair lock, unfair lock, optimistic lock, pessimistic lock When to use reentrant lock describe the level of locking methods lock, object lock, class lock What is the difference between live lock and deadlock in Java? What is a Deadlock? What causes thread deadlocks? How do you ensure that N threads can access N resources without causing the difference between the deadlock deadlock and live locks, the difference between the deadlock and starvation How to detect whether a thread with how to realize the distributed lock lock what lock-free data structures and their implementation principle is what Read-write lock can be used for any application scenario Executors class is what? 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 do you implement exceptions

The basic concept

What is what is the difference between the Error and the Exception UnsupportedOperationException NullPointerException and what is in common between ArrayIndexOutOfBoundException What are checked exceptions and runtime exceptions? How do run-time exceptions differ from common exceptions? Briefly describe a Runtime exception that you see most often, finally

How is the finally keyword used in exception handling? If a method returns a result before a finally block is executed, or the JVM exits, will the code in the finally block still be executed? Will the finally {} statement immediately following the try be executed, when will it be executed, and before or after a return? Throw and throw.

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

How to perform transactions in JDBC? What is the JdbcTemplate? What is the DAO module? How to improve the performance of reading data using JDBC? How to improve updated data performance List 5 JDBC best practices that you should follow IO

File What method is defined in the File type to create a level 1 directory what method is defined in the File type to determine if a File exists

There are several types of streams in Java. The JDK provides some abstract classes for each type of stream to inherit, which classes operate on text files which I/O streams read and write to various basic data types and strings, What stream can be used to specify what type of I/O stream with character encoding is serialized and what is serialized? How to implement Java serialization and precautions The difference between Serializable and Externalizable Socket Socket options TCP NO DELAY what layer of the TCP/IP stack does the Socket work on What is the difference between a direct buffer and an indirect buffer? How to read and write ByteBuffer? How many bytes are stored in the buffer after n characters are entered from the keyboard with System.in.read(buffer) how to use Scanner Class tokenization Object-oriented Programming

Explain the realization principles of polymorphism, encapsulation, cohesion and coupling what are encapsulation, inheritance and polymorphism what are the principles of object encapsulation? There is a difference between Overload and Override when a class obtains a class object. Can overloaded methods be differentiated by return type? Abstract classes can have static main methods. Abstract classes can not be implemented. Abstract classes can not be implemented Can anonymous Inner classes inherit from other classes? Whether the interface can be implemented

Inner class An inner class is divided into several inner classes. Can you refer to a member of its containing class (outer class) please explain why inner classes were introduced in Java? What’s the difference between anonymous inner class Inheritance and Aggregation what’s the difference between Inheritance and Aggregation why can A class only be inherited, interfaces can be inherited there are two classes, B inherits A, C inherits B, can YOU convert B to C? For example, C = (C) B 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 go wrong? Interface What is an interface? Is an interface inheritable? What are the advantages of interfaces generics

What questions do generics exist to solve? Can a List be converted into a List utility class

Calendar What is the purpose of the Calendar Class how do you get an instance of a Calendar Class in Java and explain some of the important methods in Calendar classes what is the GregorianCalendar Class what is the SimpleTimeZone Class what is the Locale Class how do you format a date object How to add hour to a Date object How to convert the string YYYYMMDD to a Date Math math.round () what does it do? Math.round(11.5) equals what? What is math.round (-11.5)? XML 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? How to solve the Chinese problem when parsing XML files with JDOM? How do you parse what aspects of XML technology you are using in your project? How to implement dynamic proxy

Describe several implementation methods of dynamic proxy, and describe the advantages and disadvantages of the corresponding design patterns

What are Design Patterns? What design patterns have you used? What business grade design patterns do you know? What design patterns increase system extensibility singletons Besides singletons, what other design patterns have you used in production? Write Singleton Singleton pattern what is the double check of the Singleton pattern how to create a thread-safe Singleton what is the Singleton pattern of the class Write three Singleton patterns implement the adapter pattern What is the adapter pattern? When using the adapter pattern and what’s the difference between the proxy pattern before What is the difference between adapter pattern and decorator pattern When to use the flyweight pattern When to use portfolio model When to use the visitor pattern What is the template method pattern Please give a conform to the design of the open closed principle model example of open problems A one-sentence summary Which dependency injection method do you recommend using, constructor injection or Setter method injection trees (binary or otherwise) form the basis of many common data structures. Describe some of these data structures and when you can use them and how you can design an online system that suddenly becomes incredibly slow, How do you find the problem what kind of project doesn’t work with the framework how sina Weibo is implemented and tweets to subscribers just a little bit about what happens in Java Web applications from the time the browser enters the URL to the time it gets to the request screen please talk a little bit about SSH integration with high concurrency, How to safely modify the same line of data how to realize the booking system of 12306.cn and how to ensure that tickets will not be oversold how to optimize the performance of the website How to optimize the server architecture I have participated in designing please think about a plan to realize countDownLatch in a distributed environment. Designing a self-adaptive local cache that can control the overall size of the cache what was probably the most difficult technical challenge in your career how to write a design document, what is the directory what is the capital O? Just to give you a couple of examples of how I think about design principles in programming, like open and close principles, and how they apply to my work and explain the patterns and characteristics of web applications and design an online document system where documents can be edited, How to prevent multiple people from editing and updating the same document at the same time tell us how data connection pooling works how to get the highest frequency of words in a file describe your most common programming style and if you have the opportunity to redesign your product, How do you do it how do you set up a high availability system how do you start without entering a user name and password how do you upload and download files in a Java-based Web project how do you implement a seckill system so that only a few users can buy something? How to achieve load balancing, what algorithms can achieve how to design a shopping cart? Think about how taobao’s shopping cart is implemented how to design a high concurrency payment scheme, how the architecture is designed how to create and maintain 100W long connections and how to avoid browser caching. How to prevent the cache avalanche If AB two systems rely on each other, how to remove according to If someone malicious create illegal connection, how to solve If there are billions of white list, need high concurrent query during the day, every day needs to be updated once in the evening, how to design the function If the system to use large integer (over the length of the long range), Please design a data structure to store the large Numbers and to design an algorithm to achieve large integer addition operation) if you want to design a graphics system, please design basic graphic element (Point, Line, Rectangle, Triangle) of simple implementation If you implement a concurrent safe list, How would you differentiate an application server from a WEB server? How does the application server monitor performance? What application server optimization techniques have you used what are the big sites that should be considered architecturally and have you dealt with online issues? Memory leaks, CPU usage spikes, how to deal with unresponsive applications What books you read recently, what are the most impressive descriptions of common refactoring techniques what version management tools do you use? What’s the difference between Branch and Tag do you know what anti-patterns exist what front-end optimization techniques do you use and how do you analyze Thread dumps How do you understand the concepts of Joinpoint, Pointcut, Advice, Introduction, Weaving, and Aspect in AOP and how do you handle memory leaks or stack overflows in your online applications What are the JVM parameters that improve the QPS and throughput knowledge of your system

Explain what MESI is and talk about the reactor model what new features are introduced in Java 9 compared to C++, the simple principles and applications of exception handling in C++ or Java a little bit about Tomcat architecture, And what is the class loader process virtual memory? Tell us about the SOLID principles. Tell us briefly about your understanding of test Driven Development (TDD). What each means. What kernel parameters have you looked at in Linux? Tell me what you know about Linux and how to use one line of command to look at the last five lines of a file which Linux commands you normally use to output a running Java process with one line of command what commands you use 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? Tell me what you understand restful is what is zAB protocol and what is domain Model? What is the difference between anaemic Domain Model and rich Domain Model? What is Domain Driven Development Service Framework Web Server, Web Container, and Application Server What is the difference between MicroServices and Monolithic applications What is the difference between Cookie and Session? How Session works? How do you use Static Code Analysis and Continuous Integration tools to Normalizations databases What are the principles of distributed transactions, advantages and disadvantages, and how to use distributed transactions? How to do the unique serial number network HTTPS encryption is what, HTTP connection pool implementation principle HTTP cluster solution Nginx, Lighttpd, Apache three mainstream Web server differences have seen the framework of some code persistence layer design to consider what are the problems? What are the numerical improvements in persistence frameworks that you’ve used and can you explain the Leeley substitution principle how you test an application? Know which test framework transport layer common programming protocols are there? And say their characteristics of programming problems

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 1000 monthly salary, 9 hours of overtime is calculated as 2500 monthly salary, 11 hours of overtime is calculated as 1000 monthly salary, 15 hours of overtime is calculated as selling 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

Write a regular expression that matches the time string 2008-8-8 20:08:08, 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. Write a multithreaded program in Java, such as write four threads, two plus 1, two on a variable minus one, output wait-notify write a code to solve the producer-consumer problem number

Determine how many primes there are between 101 and 200 and print out all the primes the most efficient way to figure out what 2 times 17 is 100 million numbers, 2 of them are duplicates, find it quickly, Time and space to optimize 200 million random generation of unordered integer, find the middle size of the value of 1 billion numbers inside find the smallest 10 natural numbers from 1 to 100 million, find the sum of all the numbers after splitting, such as 286 split into 2, 8, 6, such as 1 to 11 split after the sum of the numbers => 1 +… A number is said to be perfect if it is equal to the sum of its factors. For example, 6=1+2+3. Program to find all the numbers up to 1000. All the elements in an array appear three times, except one element that appears once. And when it lands again, how many meters does it travel on the 10th landing? How high is the 10th bounce? Find the average of the sum of primes from 1 to 100. Find 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. Figure out the sum of 1 to 100, figure out the prime numbers from 1 to 40, put them into the array and display the number in the group. Find out the number [5] and delete the number [9], and then display the number [9] after deletion. There are 3n+1 digits, among which 3n are repeated, only 1 is not repeated, how to find out. There is a set of numbers 1.1.2.3.5.8.13.21.34. Fizz Buzz Given an array of N integers, find the missing integers An ordered array, find 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=2335. 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 cubed +5 cubed +3 cubed swap the values of two variables in place find the median of the 4-byte integer find the square root of the integer implement 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 reflection used in reflection class.forname and ClassLoader what are the three ways to create an instance of a Class how do you call an object through reflection how do you get and set the value of an object’s private field through reflection advantages and disadvantages of reflection database

Write a JDBC Oracle program, and achieve data query algorithm

50 people sit in a circle, and when you count to three or a multiple of three, ask the rest of you who they are and what their original position was to implement an elevator simulator by writing a bubble sort write a half-fold lookup randomly generate 20 characters that can’t be repeated and sort write a function, pass in 2 ordered integer arrays, Returns an ordered array of integer write a piece of code in traversing the ArrayList removed in one of the elements of classical problem: there are a pair of rabbits, every month since 3 months after birth was born a pair of rabbits, baby bunny to 4 months after birth to a pair of rabbits each month, if the rabbit is deathless, ask each month rabbit for total Josephine regular ring games

Write a regular expression that matches the IP address write a regular expression that determines whether a string is a numeric 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 whether they are palindromic strings write a string inversion function, enter abcde to convert into edCBA code small game, Invert the words in the sentence Convert the GB2312-encoded string to the ISO-8859-1 encoded string Write A code to count the number of characters “A” in A given text. Write a string truncation function in iterative and recursive ways. 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 2 files containing word lists (one per line), Programmatically list intersections print out all permutations of a string convert a keyboard input number into Chinese output (e.g. : Input 1234567, output: one hundred and twenty-three thousand five hundred and sixty-seven) in the process of Web application development often encounter output some code character, such as from GBK to ISO8859-1, how to output a certain code string date to calculate the gap between the two dates