Read a lot of articles, a little bit of a summary of the most basic form of participation in the argument has a certain understanding, although not deep enough.1. Basic Concepts
Formal parameters: All called "formal arguments" are
DefinedThe responsibility is dynamically attached to the object. To extend functionality, decorators provide a more resilient alternative than inheritance.Class diagram(Image from headfirst design mode)Java instanceIn online games there are usually
Usage:Can be used to get the current time of the number of milliseconds, the number of milliseconds can be compared by time, time conversion and time formatting and so on.public class SystemTime {public static void Main (string[] args) {Defining the
Basics: Keep in mind the various methods of string manipulation:? ??? String s = "AAALJLFEAKDSFLKJSADJAEFDSAFHAASDASD"; Number of occurrences int num = 0; Loop through each character to determine if it is
As a common platform, the JDK itself is also the performance of concurrent programs, and in the JDK do everything possible to provide the concurrency of the system throughput. here, I'll give you a brief introduction to several "lock" optimization
Task timeout processing is a common requirement, such as when doing more time-consuming operations (such as network requests) or when taking up some of the more valuable resources (such as database connections), we usually need to set a time-out for
1. The previous project structure was resolved as follows: 2. Select File->project Structure ... 3. Select the sources item under the Modules tab, right-click on the main folder and select New Folder ... and click OK 4. Enter the name of the folder
System variables → new java_home variable.Variable value fill in the JDK installation directory (I am E:\Java\jdk1.7.0)
5System variables → find Path variable → editEnter%java_home%\bin;%java_home%\jre\bin at the end of the variable value;System
Turn on multithreading1, Inherit thread2, overriding the Run method3, write the code that will be executed in the Run method4, create a subclass object for the thread class5, turn on thread /** * @param args */ public static void
Java Multi-Threading security issues:Because there may be shared resources in a multithreaded code block, when a thread is using a shared resource, the CPU causes the threads to be hoisted and instead executes another thread, and the second thread
JavaBasic1. Where Java is different from other languagesA: The biggest feature of Java is its platform independence, the Java compiler compiled Java source code into bytecode and then the JVM is responsible for interpreting execution, for the
1, Thread-safe hashmapIf a thread-safe hashmap is required, it can be implemented using the Synchronizedmap (map m) method of the Collection tool class.Collections.synchronizedmap (m);Into the method, Public static map synchronizedmap (map m) {
In general, we can use the Getremoteaddr () method of the request to get the actual IP of the client, but using the reverse proxy, we use GETREMOTEADDR () is unable to obtain the real IP.After the agent, a middle tier is added between the client and
Friends to interview asked a lot of abnormal handling problems, daily work encountered is not enough explanation, here write a post to explain.(1) Runtime exception (checked exception): Inherited from Java.lang. RuntimeException classCommon 5
System, which represents the program, provides the corresponding system property information, and system operation. The system class cannot create objects manually because the constructor method is private and prevents objects from being created by
in Java, a package is used to solve a class name conflict problem, which is a set of related classes and interfacesAdvantages of the package: avoid a large number of class name conflicts and enlarge the namespace.Package embodies the encapsulation
The class is the classes in the Java.lang package that are used to encapsulate the state of the object runtime. When a class is loaded and an object is created, an object of type class related to that class is also automatically created.(1) Class
A. Set setSet: A collection that does not contain duplicate elements. More formally, the collection does not contain a pair of elements E1 and E2, making E1.equals (E2), and at most one empty element. As its name implies, this interface simulates
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