The most authoritative JDO book "Java Data Objects" (different from the one in Robin ROOs)
Sun2bin sorting (Participation score: 4877, expert score: 130) published: Update: Revision: 1.0 read:14Times
1. String Array sorting:
String [] reallist =...
// Sort by alphabetAlphabetcompare AC = new alphabetcompare ();Arrays. Sort (reallist, AC );
Public class alphabetcompare implements comparator {
@ OverridePublic int compare (string str1,
I. Role of hashcode ()
Hashcode () is used to calculate the hash value. When storing data, if there are thousands of data records, each time a data is stored, it needs to be stored multiple times, which is very inefficient, use Hash
1. hashmap, that is, java. util. hashmap
Implementation of the standard link address Method. This does not need to be parsed and is very clear. (Picture from network)
Ii. Thread-safe hashmap returned by the collections. synchronizedmap ()
Java judges whether it is 32-bit or 64-bit and calls different DLL
By obtaining sun. Arch. Data. model, you can determine whether the Java is 32 or 64.
Store 32-or 64-bit DLL files in different directories for adaptive calling of DLL files
To makeProgramIt has higher flexibility and configurability. during development, we often use reflection to create a class instance, that is, to obtain an object of a class! The common practice is to use the class. newinstance is obtained. But this
1. How to split strings
1-1 Method 1: Use the split method. The source code is as follows:
String S1 = "Boo; CIM; Doo"; system. out. println ("origal S1 is:"); for (INT I = 0; I { system. out. print (s1.charat (I); } system. out. println ();
//One idea:
//Extract each character from the string, compare each character cyclically, and record the corresponding number of characters with three variables.
// The second silly way of thinking: first define 26 upper and
Java Abstract class: 2008.10.29
Abstract classes are classes that cannot be converted into objects.
When a class is declared as an abstract class, you must add the modifier Abstract
An abstract class can contain anything that a general class
In the league system where games are played today, if n people sign up for the League, the server records the number of registrants and sorts the results after the battles, determine the Top 16 or top 8.
I found a ranking algorithm for the
Connect to the Sybase Database Using Java
Step 1: to do good deeds, you must first sharpen your tools. (Download driver)
Download the JDBC driver:
URL: http://www.sybase.com/detail? Id = 1009726
There are two types: jconnect6.0 and jconnect5.5. We
Many people say, "Java is over, just wait for the decline !", Why? The simplest example is that the java system occupies very memory! When I hear this, many people will come up to defend Java and give a bunch of Performance Test reports to prove
What is Servlet?Java applications loaded and run on the Web ServerRun on the JVM managed by the servlet engine.The servlet container is responsible for the communication between the servlet and the user and the method for calling the servlet.Servlet
Sometimes you need to sort the elements in the logarithm group. Of course, you can write a proper sorting method by yourself, but since the Java package contains the arrays. Sort sorting methodWhy not use an array with few elements?
Sorting an array
The core code of the server is as follows:
@ Override public void receivedata () throws ioexception {// todo auto-generated method stub recthread = new recthread (); crtthread = new thread (recthread); crtthread. start ();} class recthread
I think the key to mastering Java Web development is:
1. Understand the B/S (Brower/Server) architecture based on internet applications;
2. flexible use of B/S Application Technology Based on Java;
The essence of web development is to implement
This article discusses when to use abstract classes and interfaces.
Abstract class ):
We know that Java object-oriented programming has the concept of inheritance. When some parent classes do not want to create their instances, we need to use
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