Questions:1. What is a collection2. What kinds of collections are reused?3. Storage sample of HashSet in set4, the collection of traversal methodsCollection: A collection container that stores object dataSingleton Collection--–| Collection the root
1. Factory method Mode (Factory methods)The factory method pattern is divided into three types:11, the Common factory model , is to establish a factory class, the implementation of the same interface for some classes to create instances. First look
Definition of the interface:Use interface to define an interface. The interface definition is similar to the definition of a class and is also the Declaration and interface body of the interface, where the interface body consists of a variable
Packaging:Encapsulation actually uses methods to hide the data of a class, controlling the user's modifications to the class and the extent to which the data is accessed. The appropriate encapsulation makes the code easier to understand and maintain,
Interface (interface) can be thought of as a pure abstract class. He allows the creator to specify the basic form of a class: The method name, the self-compiled scale, and the return type, but does not specify the method body. Interfaces also
Online to find an example of their own modified under sharing, you can pass multiple sort field array Public classSortlist{ Public StaticLogger Loger = Loggerfactory.getlogger (sortlist.class); /*** * Method Description: Custom sort
1 What is the reflection mechanism? The reflection mechanism is in the running state, for any class, can know all the properties and methods of this class, for any one object, can call any of its methods and properties; This dynamically acquired
Compare common keywords in Java to avoid confusionFinal: Used to modify a variable to indicate that the variable is the final variable and cannot be changedFinally: used when handling exceptions, indicating the final code block to
One, Stack space1, stack space storage data efficiency is high2. The data in the stack is managed according to the "advanced post-out" method3, stack space storage space is relatively small, can not store large amounts of data4. The JVM stores basic
The computer is reloading the system, so you need to reconfigure the environment Variables.First Tools required: jak, eclipse, maven, TomcatFirst configure the Java runtime Environment.The path of the new variable JAVA_HOME:JDK in the system
JAVA constructor and java Constructor
Let's take a look at two classes: Base and Derived. Note the whenAmISet member variables and the method preProcess ().Scenario 1: (No constructor for subclass)
class Base { Base() { preProcess(); }
Multi-thread conditional access tools -- CountDownLatch and countdownlatch
CountDownLatch is used to ensure that when a thread enters the waiting state, the counter reaches 0.
CountDownLatch (int)Constructor to specify the initial count.
Await
MDC and slf4jMDC in slf4jWhat is MDC in slf4j?
In addition to the trace, debug, info, warn, and error log interfaces, slf4j can also work with MDC to write data to logs. In other words, MDC is used to record logs, but its usage is different from
[Find yourself] for interface security, find your own interface
It may take seven years to develop the server, from development-advanced development-Technical Manager-advanced development -?. As a programmer, I am sure my next direction is the
LockSupport and locksupport
Case 1: The subthread waits for the master thread to issue a license!
Public static void main (String [] args) {Thread thread = new Thread () {public void run () {System. out. println ("subthread-> test pass permit! ");
Learn JVM-garbage collection (1), learn jvm-garbage collection
1. Preface
One notable difference between Java and C ++ is memory management. Unlike C ++, Java has an automatic memory Collection system (GC, you can recycle and manage memory that is
Zero-basic learning java (1): Build the Java environment and build java
I. Determine what JDK is and JRE
(1) JDK (JavaDevelopment Kit Java Development Kit)
JDK is provided for Java developers, including java development tools and JRE. Therefore, if
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