On-line self-taught the next Java agent, put out the code to make a note and summaryFirst, the purpose of using the agent1. Route method calls to the remote server2. Associating user interface events and actions during program operation3, for
Iterators (Iterator)An iterator is a design pattern that is an object that can traverse and select objects in a sequence, and the developer does not need to know the underlying structure of the sequence. Iterators are often referred to as
As one of the three basic features of object-oriented, inheritance is also an essential part of Java. Therefore, the inheritance of classes in Java and other object-oriented languages is very similar.Benefits of Inheritance:
The definition
Object-oriented Basic concepts: encapsulation, inheritance, polymorphismEncapsulation: It is the combination of data and behavior to form a unified whole, and the object of the user to hide the implementation process of the data.Inheritance: Java
What is Java Reflection (reflect)Java reflection is a key property of Java as a dynamic (or quasi-dynamic) language. This mechanism allows the program to obtain the internal information of any known-named class, including its modifiers (such as
In the Spring 3.x enterprise application development in the actual practice to see a commonly used JSP, record, view the load path of the class,It works well with the wonderful problems caused by jar package collisions. How to
Exiting a program in Java often uses system.exit (1) or system.exit (0).View the source code for the System.exit () method, as follows1 /**2 * Terminates the currently running Java Virtual machine. the3 * argument serves as a status code; By
(*) Inheritance: class name after +extends keyword, a parent class multiple subclasses, subclasses inherit all accessible members of the parent class (variables, methods)(*) rewrite (overwrite): Subclasses can override the parent class function,
Many simple interfaces are directly in the form of a URL,How to call?HttpClient Httpclient=null;Postmethod Post=null;try{HttpClient = new HttpClient ();Post = new Postmethod (Sendurl);Setting the Encoding methodPost.getparams (). Setparameter
Two methods to determine whether a vertex is in any PolygonImport
Determines whether the touch point is inside a polygon.Method 1. Mathematical Methods
The advantage of this method is that any platform can be used, not only for
For (String s: v), forstring
S is the variable assigned after traversal, and v is the list to be traversed.You can use the following statement to test:List v = new ArrayList ();V. add ("one ");V. add ("two ");For (String s: v ){System. out.
[2] spring mvc Study Notes
The method described above is the most basic and original method.
When multiple operations such as addition, deletion, modification, query, and so on occur, it is not very convenient to use. Therefore, annotations are used
Java list deduplication with one line of codeUnsupported Syntax 1. No type Syntax:
List listWithoutDup = new ArrayList(new HashSet(listWithDup));2. Write the String type ):
1) Java 7:
List
listWithoutDup = new ArrayList
(new HashSet
Proxy mode in Java
/*** Gamer interface ** @ author stone **/public interface IGamePlayer {// log on to the game public void login (String user, String password); // kill the monster, main features of online games: public void killBoss (); //
Adapter mode in Java
We often encounter such a situation that there are two ready-made classes with no connection between them, but now we want to use one of the class methods, I also want to use another class method. One solution is to modify their
[Original] quickly build unit simulation using system OpenGL
During Simulation of some unit modules, a certain format of data incentives is often required. For example, a unit module that processes TCP packets needs to be constructed to conform to
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