Just get started, the notes are clear.Writing enumeration Classes/*** You can use an interface or class to wrap an enumeration element so that it can call the portal uniformly*/ Public InterfaceTESTENUMINTFC {/*** Create an enumeration object*/
Case:There is a commodity sales organization, only one producer, two consumers, please use a multi-threaded approach to this case implementation.//inventory function, which holds the information of the stock Storage.java Public classStorage
to understand the class loader, first understand the loadI. Loading of classes (overview of loading classes)When a program wants to use a class, if the class has not yet been loaded into memory, the system initializes the class by loading,
three major featuresPackage The so-called encapsulation, that is, to encapsulate objective things into abstract classes, and classes can be their own data and methods only let the trusted class or object operation, to the untrusted information
Implementation method:Temporarily write a method that writes the string out to a local file , which can be supplemented in more ways later: Public Static voidMain (string[] args) {/*** ============== to prepare some
Package Hope.ipaddress.demo;import Java.net.inetaddress;import Java.net.networkinterface;import Java.net.socketexception;import java.util.enumeration;/** * Get current server IP * @author HP * */public class Ipdemo {/** * @param args */public
The 2.Set Usage Scenarios API describes: The Java.util.Set interface, like the Java.util.List interface, inherits from the collection interface, and It is basically consistent with the methods in the collection interface. There is no functional
What we are learning today is how to achieve the sharing of variable data within the scope of the thread itself, and the various threads are independent from each other, and each one is maintained, that is, what we call the Threadlocal
JVM is one of the important components of the Java platform, because it involves too many points of knowledge, so from the following aspects of the JVM for a shallow introduction, if you need to understand deeply, it is recommended to learn the
Reference Link: 8288251Reentrantlock Class 1.1 What is the lock framework in Reentrantlock Java.util.concurrent.lock is an abstraction of locking, which allows the implementation of a lock to be implemented as a Java class, rather than as a language
Interface is a higher level of abstraction than an abstract class, and all methods in an interface are abstract methods without any code for implementation.1. The method of interface can only be public abstract. (public abstract can be omitted, can
In the Java keyword (v)--this We say that the This keyword is a reference to the current object. The Super keyword in Java is a reference to an object that represents the parent class. We analyze the phrase "reference to the parent class object",
Three kinds of mechanisms for class loading 1, by GetClassPeople p =new People();Class c = p.getClass();2, People.classClass c1=People.class;3, Class.forName ("Tianpo.com.demo.People");Class c2=Class.forName("tianpo.com.demo.People");Object
Sleep is a method in thread, and wait is a method in object.Sleep is a thread that goes into hibernation, waits for a period of time, enters the operational state, waits for the CPU to allocate resources and run. At the same time sleep process, it
1, first to check the data engine, InnoDB support transactions, MyISAM does not support transactions2. The default spring transaction is rolled back only when an uncaught runtimeexcetpion occurs.Spring AOP Exception Trapping principle: The method
One, Java, using UTF-8 to encode and use UTF-8 UrlEncode encoding results are differentUTF-8 "Junshan":& #x541B;& #x5C71;Utf-8/urlencode "Junshan":%e5%90%9b%e5%b1%b1String s = "Junshan"; = Urlencoder.encode (S, "UTF-8"); //
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