½ØÈ¡×Ö·û´®(ÖÐÓ¢»ìºÏ´®) JAVA´úÂë
public class SplitString {
/**
* @param args
*/
public static void main(String[] args) {
String str = "ÖÐZellÖйú5000Äê,Congruations!";
int bytes = 8;
str = new SplitString().getSubString(str, bytes);
System.out.println(str);
}
public String getSubString(String str,int bytes){
int temp = bytes;
byte [] AllBytes = str.getBytes();
int AllStrByteLen = AllBytes.length;
if(bytes > AllStrByteLen | bytes <= 0){
return str;
}
int ChinaWordsNum = 0;
for(int i=0;i<temp;i++){
int IntOfByte = (int)AllBytes[i];
if(IntOfByte < 0 ){
ChinaWordsNum+=1;
}
}
if(ChinaWordsNum%2 == 0){
return new String(AllBytes,0,temp);
}else{
if(bytes == 1){
return null;
}
&
Ïà¹ØÎĵµ£º
¡¡¡¡¾Ý¹úÍâýÌ屨µÀ£¬MozillaÒѾÕë¶ÔFirefoxÉèÖÃÁËÒ»¸ö¶ñÒâJava²å¼þÆÁ±ÎºÚÃûµ¥¡£
¡¡¡¡¾Ý°²È«²©¿ÍBrian Krebs½éÉÜ£¬ÉÏÖܼ׹ÇÎĹ«Ë¾·¢²¼ÁËÒ»¸öÐÞ¸´Java²å¼þ©¶´µÄ¸üУ¬µ«ÊÇMozilla¿ª·¢ÈËÔ±·¢ÏÖ£¬Õâ¸ö¸üÐÂûÓÐɾ³ý¾É°æ±¾µÄ´úÂ룬ʹµÃϵͳÈÔÈ»ÁôÏÂÁË©¶´´úÂ룬´Ó¶øÊ¹µÃÒÅÁô´úÂë³ÉΪеĩ¶´¡£¶Ô´Ë£¬Mozilla²»µÃ²»½«ÆÁ± ......
Ò»¡¢ÏîÄ¿°æ±¾¹æ·¶£º
1¡¢°æ±¾ºÅÃüÃû¸ñʽ£º
V Ö÷°æ±¾ºÅ.´Î°æ±¾ºÅ.ÐÞÕû°æ±¾ºÅ
a£®³õʼ°æ±¾ºÅΪV1.0.0£»
b£®ÀàÊôÐÔ»òÀà·½·¨µÄÄÚÈÝ·¢Éú±ä»¯Ê±£¬Ö÷°æ±¾ºÅºÍ´Î°æ±¾ºÅ¶¼²»±ä£¬ÐÞÕû°æ±¾ºÅ¼Ó 1£»
c£®Ôö¼ÓÁËÀà»ò½Ó¿Ú·½·¨Ê±£¬Ö÷°æ±¾ºÅ²»±ä£¬´Î°æ±¾ºÅ¼Ó 1£¬ÐÞÕû°æ±¾ºÅ¸´Î»Îª0£»
d£®Ôö¼ÓÁËÀà»ò½Ó¿Úʱ£¬Ö÷°æ±¾ºÅ¼Ó1£¬´Î°æ±¾ºÅ¸´Î»Îª0 ......
µÚ1Ìõ How to Write an Equality Method in Java
http://www.artima.com/lejava/articles/equality.html
How to Write an Equality Method in Java
by Martin Odersky, Lex Spoon, and Bill Venners
June 1, 2009
Summary
This article describes a technique for overriding the equals method t ......
Õ⼸Ìì²Î¿¼ÓйØ×ÊÁÏ£¬½èÖúinstall4jÈí¼þ×ÜËã³õ²½Ñ§»áÁËJava³ÌÐò£¨jar£©´ò°ü³É¿É°²×°µÄWindowsÓ¦ÓóÌÐòµÄ·½·¨¡£
Ïà¹ØÈí¼þÔÚ£ºhttp://download.csdn.net/¿ÉÒÔËÑË÷µ½
ÒÔÏÂÊǹý³Ì¼Ç¼£º
1.
ͨ¹ý¸÷ÖÖ·½Ê½Éú³ÉÒ»¸ö¿ÉÖ´ÐеÄjarÎļþ£¨Çë²Î¿¼£ºhttp://blog.sina.com.cn/s/blog_65bb33240100ii4r.html£ ......
±äÁ¿£º´æ´¢Êý¾ÝµÄ»ù±¾µ¥Ôª£»Ò»¸öÊý¾Ý´æ´¢¿Õ¼äµÄ±íʾ.
»ù±¾Êý¾ÝÀàÐÍ(8ÖÖ)£º
byte(1)-->short(2)-->int(4)-->long(8) float(4)-->double(8) boolean(1) char(2)
ÒýÓÃÊý¾ÝÀàÐÍ£º
String¡¢Êý×é¡¢Àà¡¢½Ó¿Ú¡¢¶ÔÏó ......