Key points of this Chapter
1. Three basic features of Java object-oriented: encapsulation of encapsulate, inheritance of inheritance, and Polymorphism of polymorphsim.
2. Object-orientedProgramAdvantages and disadvantages of design and structure-
Proxy mode:ArticleLink: http://www.iteye.com/topic/517835Proxy mode: provides a proxy object for an object, and the proxy object controls the reference of a specific object.
Proxy refers to a role that represents another role to take action. Just
Java thread security: the usage of the synchronized keyword is unknown today. The synchronized keyword is used.CodeThread Synchronization is safe.
Tested. It is totally wrong. Synchronized must be correctly used to ensure real thread security...
Developed for JavaProgramTo package the package into an installer. The main process is as follows:
Eclipse: Java-> class-> jar
Exe4j: xxx.exe
Registration: the user company can write
A-XVK258563F-1p4lv7mg7sav A-XVK209982F-1y0i3h4ywx2h1
Meanings of final keywords in Java language: 2008.10.29
The final keyword can be placed before the variable name, method, and class.
Final is used differently in different contexts, but it means "final" and "unchanged ".
Final is placed
Public class deadlock {/** * @ Param ARGs */ Public static void main (string [] ARGs) { // todo auto-generated method stub final object resource1 = "resource1"; final object resource2 = "resource2 "; thread T1 = new thread () { Public void run
I found a lot of examples on the Internet and finally made the final results,
Year, month can be a self-Written string
String month = session. getattribute ("month"). tostring ();String day = "01 ";String T = year + "-" + month + "-" +
Because the project needs to be used, some common operations are encapsulated:
/*** Get Attribute Value Based on attribute name **/private object getfieldvaluebyname (string fieldname, object O) {try {string firstletter = fieldname. substring (0,
The runnable interface is implemented in actual projects.
To use thread to implement multithreading, The extends Thread class is required. In Java, only one class can be extends, which limits the inheritance of classes.
Runnable is used to
Not much.CodeLet's go !!!
Public class checkpassword {/*** password strength ** @ return z = letter S = digit T = special character */Public String checkpassword (string passwordstr) {string regexz = "\ D *"; string regexs = "[A-Za-Z] +";
After downloading the source code of Oscache, you need to add some functions. Compile the code after importing eclipse. The cache. Java file reports the following error:
Description resource path location typeThe Method Add (class , T) in the type
1.
How to read and output a data or array from the console
Input a number and Output2Medium Method
1) bufferedreader BR =NewBufferedreader (NewInputstreamreader (system.In); // Read oneNumber
StringSTR = Br. Readline ();
IntI = integer.Parseint(
Before introducing jsonp, we will briefly introduce some JSON. JSON is short for JavaScript Object Notation and is a lightweight and readable open standard for text-based data exchange. It is derived from the presentation of simple data structures
To put it simply, Java's serialization mechanism verifies version consistency by judging the serialversionuid of the class at runtime. During deserialization, the JVM compares the serialversionuid In the byte stream with the serialversionuid of the
Reason and handling of VM exceptionsCause: 1. Because abnormal statements are detected by the virtual machine. Throw an exception at the statement execution point. Possible scenarios include violation of semantic operations such as array crossing,
In response to foreign and Chinese customers, the project requires text conversion through configuration. This process is very simple in Java,
The main user must use the following language to define a configuration file:
File Content:
Language =
As a Java programmer, the most painful thing is that you can choose a wide range of books, you can read too many books, and it is often easy to get at a loss. I want to select some technical books I have read and recommend them to you in the order
From: http://www.cnblogs.com/huangfox/archive/2010/10/11/1847863.html
I. shortlist
3.1 create: Sequence List ()
The underlying data structure of the shortlist is a two-way linked list. Since it is a two-way linked list, there must be a Data
The previous understanding of string is limited to three points:
1. string is a final class and cannot be inherited
2. Comparison strings of the string type must be equal to "equals" and cannot be "="
3. the string class cannot be changed.
String
/*** Get the first day of this month * @ return */public static string getmonthfirstday () {simpledateformat SDF = new simpledateformat ("yyyy-mm-dd"); Calendar calendar = calendar. getinstance (); Calendar. set (calendar. day_of_month, calendar.
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