JAVA°´ºº×Ö°´Í·×ÖĸÅÅÐò
public static void main(String args[]) {
Comparator cmp = (RuleBasedCollator)java.text.Collator.getInstance(java.util.Locale.CHINA);
String[] array = {"ÕÅÈý", "ÀîËÄ", "ÍõÎå"};
Arrays.sort(array, cmp);
for(String str : array){
System.out.println(str);
}
}
Ïà¹ØÎĵµ£º
×Ô¶¨ÒåµÄKeyÀàÐèÒªÖØÔØequals, hashCodeº¯Êý¡£¡£
package com.albert.test;
import java.util.Vector;
import java.util.HashMap;
/**
* @author tough_guy
*
*/
//¶ÔÓÚ×Ô¶¨ÒåµÄkey£¬ ÐèÒªÖØÔØhashCodeº¯ÊýºÍequalsº¯Êý
class IPSegment
{
long ip_s;
long ip_e;
int p;
IPSegment Reset(long f ......
1. RabbitÁ÷ÃÜÂ루Rabbit Stream Cipher£©¼ò½é
RabbitÁ÷ÃÜÂëÊÇÓÉCryptico¹«Ë¾£¨http://www.cryptico.com£©Éè¼ÆµÄ£¬ÃÜÔ¿³¤¶È128룬
×î´ó¼ÓÃÜÏûÏ¢³¤¶ÈΪ264 Bytes£¬¼´16 TB£¬ÈôÏûÏ¢³¬¹ý¸Ã³¤¶È£¬ÔòÐèÒª¸ü»»ÃÜÔ¿¶ÔʣϵÄÏûÏ¢½øÐд¦Àí¡£ËüÊÇÄ¿Ç°°²È«ÐԽϸߣ¬¼Ó/½âÃÜËٶȱȽϸßЧµÄÁ÷ÃÜÂëÖ®Ò»£ ......
XMLÎļþ book.xml
<book>
<person>
<first>Kiran</first>
<last>Pai</last>
<age>22</age>
</person>
<person>
<first>Bill</first>
<last>Gates</last>
<age>46</age>
</person>
<person>
&l ......
¹éÄÉһЩÍøÉÏÈ¡JAVA·¾¶µÄ·½·¨£º
×¢Ã÷£ºÈç¹û´ÓANTÆô¶¯³ÌÐò£¬this.getClass().getResource("")È¡³öÀ´µÄ±È½Ï¹Ö£¬Ö±½ÓÓÃJAVAÃüÁîÐе÷ÊԾͿɳɹ¦¡£
µÃµ½classpathºÍµ±Ç°ÀàµÄ¾ø¶Ô·¾¶µÄһЩ·½·¨
»ñµÃCLASSPATHÖ®Íâ·¾¶µÄ·½·¨£º
URL base = this.getClass£¨£©.getResource£¨""£©£» //ÏÈ»ñµÃ±¾ÀàµÄËùÔÚλÖã¬Èç/home/popeye/ ......
ÔÚʵ¼ÊÏîÄ¿Öиø¶¨Ò»Îļþ¼Ð£¬µÃµ½Õâ¸öÎļþ¼ÐÏÂËùÓеÄÎļþÕâÑùµÄÐèÇó²¢²»ÊǺܶ࣬¸ü¶àµÄÊDzéÕÒ»òÊÇɾ³ýijһ¾ßÌåµÄÎļþ
import java.io.File;
import java.util.ArrayList;
public class FileTest {
private static ArrayList<String> filelist = new ArrayList<String>();
public stati ......