This article is from: Java head http://mp.weixin.qq.com/s/PIBZQDFQLk3aTX11x5-NNw
I. The concept of generics (why generics are needed).
First, let's look at the short code below:
Defines a collection of list types, in which two string-type values
/**
* 1, the null judgement of the string org.aphche.commons.lang.StringUtils
*/
Checks If a String is empty ("") or null.
SYSTEM.OUT.PRINTLN (Stringutils.isempty (null)); True
System.out.println (Stringutils.isempty (""));
As we all know, the disadvantage of multithreading is that the code will be the interference of concurrent access, the solution is the synchronization mechanism. The two common forms of synchronization are synchronous code blocks and synchronization
The cost of starting a new thread is relatively high because it involves interacting with the operating system. In this case, using a thread pool provides a good performance, especially when you need to create a large number of short-lived threads
One, two implementations of the thread
1. Inherit the thread class:
(1) "Inherit directly from the main class"
package org;
Inherit Thread class
public class Testthreadofext extends Thread
{
private static int count = 0;
public static void
Scene:
Put the class files and jars in the project into the D:\loader\terry\codex directory, how to get the project to load and use these classes in code way.
Scenario: Using URLClassLoader constructs D:\loader\terry\codex the class loader under
Nonsense not much to say, directly on the code:
Import Java.io.File;/** Recursive algorithm to traverse the folder, print out all exe file file name*/public class Traversefolder {Recursive method-"foldername: The name of the file (folder) to
The whole stack development training course in the east this is about to start, the new 0 basic newcomer is not very catch, want to in six months, to find a Java Junior Programmer's work, what knowledge points are must master, what can be now learn
Reentrantlock is a lock that supports re-entry, which means that the lock supports a thread's repeated lock on the resource, which in addition supports the fairness and unfairness of the acquisition lock. 1 The realization of the re-entry
For the
We continue to discuss the threadpoolexecutor thread pool. In the simplest use of the threadpoolexecutor thread pool, which is given in the previous article, we have adopted only one of the simplest threadpoolexecutor constructors:
Public
A colleague from C + + asked me to help write a regular expression: Verify that a value is a number. I simply wrote one in Java code.
public class Test {public static Boolean CheckNumber (double value) {String str = string.valueof (value); String
Before writing the C # project, it is convenient to redo the list, using List1. Union (List2). ToList () can (enumerable.union). And, if you want to remove the List2 item from the List1, it is also convenient, list2. Except (List1). ToList ()
Now
Interviewing is a simple and complicated thing, it is precisely because of the two sides of the simple and complex, so we have to learn more interview skills in the interview, if you say that master these things also have no birds to use, then I am
How to stop a thread correctly
This article (How to stop thread) gives a good answer to the proper stopping of threads, summed up 3 points below (when stopping threads):
1. Use the violate Boolean variable to identify whether the thread is stopped
2
First, take a look at the concept of reflection:
The Java reflection mechanism is in the running state, and for any class, all the properties and methods of the class are known, and any one of its methods can be invoked for any object, and this
Http://bbs.itheima.com/thread-51369-1-1.html
OK, but even if you write this class, it's no use. This question involves the loader's delegate mechanism, in the class loader's structure diagram (below),Bootstrap is the top-level parent class,
Lightweight (lightweight) lightweight description is relative to some heavyweight containers (such as the EJB container), Spring's core package is less than 1MB in file capacity, and the resource burden required to use the spring core package is
question 25th: Replication of complex lists Topic Description: Enter a complex list (each node has a node value, and two pointers, one point to the next node, and the other special pointer to any node). The result is the head of the complex
Environment and version
In addition to the related Lib in the previous article hibernate
the hibernate of Java transaction Management
You also need to join Spring's lib package and some of the following dependency
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