Java×Ö·û´®º¯Êý¼¯½õ
javaÖеÄ×Ö·û´®Ò²ÊÇÒ»Á¬´®µÄ×Ö·û¡£µ«ÊÇÓëÐí¶àÆäËûµÄ¼ÆËã»úÓïÑÔ½«×Ö·û´®×÷Ϊ×Ö·ûÊý×é´¦Àí²»Í¬£¬Java½«×Ö·û´®×÷ΪStringÀàÐͶÔÏóÀ´´¦Àí¡£½«×Ö·û´®×÷ΪÄÚÖõĶÔÏó´¦ÀíÔÊÐíJavaÌṩʮ·Ö·á¸»µÄ¹¦ÄÜÌØÐÔÒÔ·½±ã´¦Àí×Ö·û´®¡£ÏÂÃæÊÇһЩʹÓÃƵÂʱȽϸߵĺ¯Êý¼°ÆäÏà¹Ø˵Ã÷¡£
StringÏà¹Øº¯Êý
1)substring()
ËüÓÐÁ½ÖÖÐÎʽ£¬µÚÒ»ÖÖÊÇ£ºString substring(int startIndex)
µÚ¶þÖÖÊÇ£ºString substring(int startIndex,int endIndex)
2)concat() Á¬½ÓÁ½¸ö×Ö·û´®
Àý:String s="Welcome to ";
String t=s.concat("AnHui");
3)replace() Ìæ»»
ËüÓÐÁ½ÖÖÐÎʽ£¬µÚÒ»ÖÖÐÎʽÓÃÒ»¸ö×Ö·ûÔÚµ÷ÓÃ×Ö·û´®ÖÐËùÓгöÏÖij¸ö×Ö·ûµÄµØ·½½øÐÐÌæ»»£¬ÐÎʽÈçÏ£º
String replace(char original,char replacement)
ÀýÈ磺String s=”Hello”.replace(’l',’w');
µÚ¶þÖÖÐÎʽÊÇÓÃÒ»¸ö×Ö·ûÐòÁÐÌæ»»ÁíÒ»¸ö×Ö·ûÐòÁУ¬ÐÎʽÈçÏ£º
String replace(CharSequence original,CharSequence replacement)
4)trim() È¥µôÆðʼºÍ½áβµÄ¿Õ¸ñ
5)valueOf() ת»»Îª×Ö·û´®
6)toLowerCase() ת»»ÎªÐ¡Ð´
7)toUpperCase() ת»»Îª´óд
8)length() È¡µÃ×Ö·û´®µÄ³¤¶È
Àý£ºchar chars[]={’a',’b’.’c'};
String s=new String(chars);
int len=s.length();
9)charAt() ½ØÈ¡Ò»¸ö×Ö·û
Àý£ºchar ch;
ch=”abc”.charAt(1);
·µ»ØֵΪ’b’
10)getChars() ½ØÈ¡¶à¸ö×Ö·û
void getChars(int sourceStart,int sourceEnd,char target[],int targetStart)
sourceStart Ö¸¶¨ÁË×Ó´®¿ªÊ¼×Ö·ûµÄϱê
sourceEnd Ö¸¶¨ÁË×Ó´®½áÊøºóµÄÏÂÒ»¸ö×Ö·ûµÄϱꡣÒò´Ë£¬×Ó´®°üº¬´ÓsourceStartµ½sourceEnd-1µÄ×Ö·û¡£
target Ö¸¶¨½ÓÊÕ×Ö·ûµÄÊý×é
targetStart targetÖпªÊ¼¸´ÖÆ×Ó´®µÄϱêÖµ
Àý£ºString s=”this is a demo of the getChars method.”;
char buf[]=new char[20];
s.getChars(10,14,buf,0);
11)getBytes()
Ìæ´úgetChars()µÄÒ»ÖÖ·½·¨Êǽ«×Ö·û´æ´¢ÔÚ×Ö½ÚÊý×éÖУ¬¸Ã·½·¨¼´getBytes()
Àý£º
String s = “Hello!ÄãºÃ£¡”;
byte[] bytes = s.getBytes();
12)toCharArray()
Àý£º
String s = “Hello!ÄãºÃ£¡”;
char[] ss = s.toCharArray();
13)equals()ºÍequalsIgnoreCase() ±È½ÏÁ½¸ö×Ö·û´®
14)regionMatches() ÓÃÓÚ±
Ïà¹ØÎĵµ£º
Ò»£º×¼±¸ www.savarese.org download
1. rocksaw-1.0.0-src.tar.gz
2. vserv-tcpip-0.9.2-src.tar.gz
¶þ£º±àÒëÔ´ÎļþµÃµ½jar°ü ʹÓÃAnt
1. build vserv-tcpip-0.9.2-src
ÔÚvserv-tcpip-0.9.2Ŀ¼ÏÂÃ潨һ¸ötestsĿ¼£¬È»ºóÔÚcmd´°¿ÚϽøÈë ......
Ê®¶þ javaÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(ÀàµÄ¼Ì³Ð)
/**
* ÀàµÄ¼Ì³Ð
*/
class Person
{
private String name;
private int age;
public String setName(String name){this.name = name;return name;}
public int setAge(int age){this.age = age;return age;}
public void getInfo ......
Ò»¡¢·´É䣨Reflect£©
·´Éä¾ÍÊÇ°ÑJavaÀàÖеĸ÷ÖֳɷÖÓ³Éä³ÉÒ»¸ö¸öµÄjava¶ÔÏó¡£ÀýÈ磬һ¸öÀàÓУº³ÉÔ±±äÁ¿£¬·½·¨£¬¹¹Ôì·½·¨£¬°üµÈµÈÐÅÏ¢£¬ÀûÓ÷´Éä¼¼Êõ¿ÉÒÔ¶ÔÒ»¸öÀà½øÐнâÆÊ£¬°Ñ¸÷¸ö×é³É²¿·ÖÓ³Éä³ÉÒ»¸ö¸ö¶ÔÏó¡£Ó³Éä³É¶ÔÏóºó£¬¾Í¿ÉÒÔµ÷ÓöÔÏóµÄ·½·¨¶ÔÆä²Ù×÷ÁË¡£Óë·´ÉäÏà¹ØµÄÖØÒªµÄÀàÓÐCl ......
Chapter 01
Getting Started
Ò»¡¢ºËÐĸÅÄî
1.ʲô½ÐÀࣿ
Àà¾ÍÊÇijһÖÖÊÂÎïµÄÒ»°ãÐԵļ¯ºÏÌ壬ÊÇÏàͬ»òÏàËƵĸ÷¸öÊÂÎﹲͬÌØÐÔµÄÒ»ÖÖ³éÏó¡£
2.ʲô½Ð¶ÔÏó£¿
ÔÚÃæÏò¶ÔÏó¸ÅÄîÖУ¬¶ÔÏó£¨Object£©ÊÇÀàµÄʵÀý£¨instance£©¡£¶ÔÏóÓëÀàµÄ¹Øϵ¾ÍÏñ±äÁ¿ÓëÊý¾ÝÀàÐ͵ĹØϵһÑù¡£
3.ÀàµÄºËÐÄ ......
J2SE²¿·Ö£º
¡¡¡¡13±¾¾µäµÄJavaÊ飬ÐÂÈ˱ؿ´£º
¡¡¡¡http://www.ibeifeng.com/read.php?tid=846&u=14387
¡¡¡¡
¡¡¡¡ÉÐѧÌÃÂíÊ¿±øooa&oodÃâ·Ñ
¡¡¡¡http://www.ibeifeng.com/read-htm-tid-14397.html&u=14387
¡¡¡¡
¡¡¡¡Java¸ßÇåPDFÊé¼®´óÔÓ»â
¡¡¡¡http://www.ibeifeng.com/read.php?tid=4580&u=1438 ......