Java is a strongly typed programming language, so when declaring a variable, you must declare the data type, the Java language has the basic data type and the reference data type two big data types, the basic data type has 8 kinds are 4 integral
Anti-compilation Toolhttp://download.csdn.net/detail/u011110110/8621653Anti-compilation Method:The first step: you first change the download of the package suffix name to. zipThe second step: to search the Internet Dex2jar, download one, extract to
===================================Basic Knowledge Chapter===================================PolymorphicJava ReflectionJava serializationInner class actionFinal effectInterface and AbstractClass differencesSynchronized and Volatile differencesThe
Language: JavaDevelopment platform: MyEclipse1: Build a Java Project2: Click on the top left corner File→java ProjectProject is the item name, location is the project's address, and then a Java project is created as soon as you finish.The Java
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return-321Problem Solving Ideas:It is not difficult to flip a number, can be turned into a string type flip, can also be flipped, the main problem involves the boundary
Here, you think of yourself as God.1. ObjectsYou want to show your friends a graph, if you create a rotating square, a circle, and a triangle, he wants to see which graph you will show him which graph, is object-oriented;If you create a deformed
1. Risk of activity
Deadlock (most common)
Hunger
Starvation occurs when a thread cannot continue execution because it cannot access the resources it requires. The most common resource that causes starvation is the CPU clock cycle .
1 Packagesorting;2 3 /**4 * Heap Sorting5 * Average O (nlogn), preferably O (nlogn), Worst O (nlogn), Space complexity O (1), unstable, more complex6 * @authorZeng7 *8 */9 Public classDuipaixu {Ten One Public Static voidDuipaixu (int[] a)
The total memory is divided for4 sections (Stack segment, heap segment, code segment, data segment)When we declare a local variable in the program, this variable is stored in the stack segment (stack);This object is placed in the heap segment when
1 Packagesorting;2 3 /**4 * Quick Sort5 * Average O (nlogn), preferably O (nlogn), Worst O (n^2), Space complexity O (NLOGN), unstable, more complex6 * @authorZeng7 *8 */9 Public classKuaisupaixu {Ten One Public Static intSortint[]
One of the simplest event bus implementationsMicrobus UseRegistered class Receiver implements MicroBus.BusEventReceiver { public onCreate() { bus.register(this, String.class); } public onDestroy() { bus.unregister(this, String.
MultithreadingImplement Runnable Interface than inherited thread class has the advantage of:1 ): Suitable for multiple threads of the same program code to process the same resource2 ): You can avoid Java The limit of single inheritance in3 ):
One, the date and string of the reciprocal usage, here need to use SimpleDateFormatDate date = new Date ();Set formatSimpleDateFormat SDF = new SimpleDateFormat ("Yyyy-mm-dd HH:mm:ss");String strdate = Sdf.format (date);String converted to date
Let's start by explaining several concepts:Multiplication principle: Do one thing, complete it need to divide into n steps, do first step have M1 different method, do second step have m2 different method, ..., do nth step have mn differentmethod,
Import java.text.*;public class Stringalign extends format{public static final int just_left= ' l '; Left-to-Chi Chang volumepublic static final int just_right= ' R '; Right to Chi Chang amountpublic static final int just_center= ' C '; Center
1 Packagesorting;2 3 /**4 * Merge Sort5 * Average O (nlogn), preferably O (nlogn), Worst O (nlogn), Space complexity O (n), stable, more complex6 * @authorZeng7 *8 */9 Public classGuibingpaixu {Ten One Public Static voidMerge (int[]
Simple multi-threaded applications
Well, when talking about the thread application, we need to first know how to create the thread. There are two ways to create a Thread: 1. inherit Thread class 2. Declare and implement the Runnable Method
Method 1:
Baseline 2 (48) of the timer, 248 of the baselineFilterChain
When a web project has multiple connectors, and these processors overwrite the same url. In this case, the attacker chain/is formed /.
first
cn. itcast. filter. FirstFilter
second
Basis of the browser 3-page cache and Verification Code Generation (49), over 49
Set some page cache or do not cache
To prevent all browsers from caching pages:
Response. setHeader ("expires", "-1 ");
Response. setHeader ("pragma", "no-cache
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