1. Reflective objects
Mode 11 // Reflectinfo The class you created for yourself 2 New
Mode 21 Class reflectClass2 = reflectinfo. class;
Mode 31 Class reflectClass3 = Class.forName ("Reflect.reflectinfo");
2. Reflection
1. If you want to determine if the list is empty, you can tell:if (null = = List | | list.size () ==0) {In case of an empty}else{The case is not empty}2,list.isempty () and list.size () ==0 What's the difference? Answer: no difference. IsEmpty ()
Java class modifier: The public adornment is typically used, at which point Java enforces the requirement. The Java file name must match the public-decorated class name, otherwise it cannot be compiled. If there is no modifier, the file name is not
basic idea: first, find the smallest element in the array, and then swap it with the first element of the group (if the first element is the smallest element then it swaps with itself). Again, find the smallest element in the remaining element and
Java.lang.NullPointerException NULL pointer exception is a very easy problem for beginners like me, the general situation is not careful when it appears, the beginning of the text as follows:1, the business level of error:A, no write non-null
Close the thread poolThe source code of shutdown () is as follows: Public voidshutdown () {FinalReentrantlock Mainlock = This. Mainlock; //Get lockMainlock.lock (); Try { //check that the thread pool's threads have permission to terminate.
Recent Research crawler Crawl site Links:1. Need to get all the hyperlinks2. Exclude crawled links, go to heavy3. Research on the breadth and depth of crawler (PS: No research is exhaustive)Here is the implementation code:Import
Reference http://how2j.cn/k/number-string/number-string-string/324.htmlCreate a stringString is a combination of characters, in Java, the string is a class, so we see the string is the objectCommon ways to create strings:1. Whenever a literal
first, the concept of treesOutside the root node, the remaining nodes have only one parent node.1, degreesthe degree of the node : The number of child nodes per node.The degree of the tree : The maximum number of degrees for each node within the
Related File Download:JDK Download path: http://www.oracle.com/technetwork/java/javase/downloads/index.htmlEclipse Download Path: https://www.eclipse.org/downloads/File Installation:Follow the prompts to install (to modify the installation path,
In life we often encounter synchronization problems, and most of the actual problems are thread synchronization problemsHere's an example of a train ticket for life:Suppose now we have a total of 1000 tickets to be sold, a total of 10 points of sale,
There are many kinds of Java IO methods, which can be easily distinguished based on different IO abstract models and interaction modes.The traditional java.io package , which is based on the flow model , provides some of the IO features we know best,
Reference http://how2j.cn/k/number-string/number-string-math/319.htmlJava.lang.Math provides a number of common mathematical operations and is present in the form of static methodsRounding, random number, radical, sub-square, π, natural
Cyclicbarrier literally means a reusable barrier whose main purpose is to block a group of threads from reaching a barrier, knowing that the barrier will open when the last thread reaches the barrier, and that all the threads that are blocked by the
The declaration of an enumeration is simple, likeenum Gender { Male, Female }, the rest is what the Java compiler did for us, so enum is a syntactic sugar. It is really convenient to have enumerations, which avoids the non-scope of traditional
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