just saw a iteye on the Java code initialization of the article, see the code I tried to infer the results, although the University of the knowledge of the times, did not expect to be able to do the right. (It seems that the basis of their own
A variable is a representation of a data storage space, which is the basic unit for storing data.The data types commonly used in Java are integers (int), double-precision floating-point (double), character (char), and string-type (string).Variables
I. Using the list collection to implement int[] str = {5,6,6,6,8,8,7,4}; List list =NewArraylist(); for(intI=0; i) { if(!list.contains (Str[i])) {List.add (str[i]); }} System. out. println ("Remove Duplicate List
The Java language Specification does not explicitly describe which garbage collection algorithm the JVM uses, but any garbage collection algorithm typically does 2 basic things:(1) Finding useless information objects;(2) Reclaim the memory space
The design principle is the norm, the design pattern is the skill. if the basic knowledge can be flexibly applied in the project, then I am sure I will get the unexpected harvest.In the next time, I will continue to learn design patterns, will be
The resource is not on the build path of a Java projectThis problem is generally not found in the corresponding source code, in the corresponding project,Right---->properties---the Source tab is found on the >java Build Path, which generally refers
Chapter 7 categories and objects and Chapter 7 Objects
1. java is an Object-Oriented programming language (OOP ).
2. The advantages of OPP are:
So that people's programming is closer to the real world. All objects are Assigned attributes and methods,
JAVA learning notes-strategy design mode and adapter mode, learning notes Design Mode
I. Strategy Design Model
Creating a method with different behaviors based on different objects passed is called a policy design pattern;This type of method
Struts2 _ use the token Interceptor to control repeated submissions (rarely used), struts2token
Control repeated submission methods: 1. Page redirection after form submission; 2. Struts2.x token interceptor
General process:
Example:
Index. jsp
1 3
Common usage of dbutil components, dbutil Components
This toolkit is mainly used to operate databases for addition, deletion, modification, and query. Wrap the result to an object or an object set.
Database operations are often involved when writing
Concepts and common methods of transactions
1. Features of transactions and ACID features
1) Atomicity (Atomicity): it is a minimum logical unit. It refers to a transaction as an inseparable unit of work. Operations in a transaction either occur
Struts2 _ receives parameters using the Action property, and struts2 receives parameters.
Define the property to be received in Action. You need to write the getter and setter methods of the property.
Struts2 automatically converts String-type
ServerSocket and Socket, serversocketsocketPreface
A Server and Client communication demo is provided with ServerSocket and Socket, and several common classes under java.net and java. io packages are used in this demo.
Server
Import java.net. *;
Struts2 _ Web access element and struts2web Element
Obtain the reference of the request, session, application, HttpServletRequest, HttpSession, and ServletContext of the Map type.
1. Obtain the first method of request, session, and application of
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