java¼¯ºÏÏê½â
Ŀ ¼
1 ¼¯ºÏ¿ò¼Ü... 2
1.1 ¼¯ºÏ¿ò¼Ü¸ÅÊö... 2
1.1.1 ÈÝÆ÷¼ò½é... 2
1.1.2 ÈÝÆ÷µÄ·ÖÀà... 4
1.2 Collection. 5
1.2.1 ³£Ó÷½·¨... 5
1.2.2 µü´úÆ÷... 8
1.3 List. 10
1.3.1 ³£Ó÷½·¨... 10
1.3.2 ʵÏÖÔÀí... 15
1.4 Map. 20
1.4.1 ³£Ó÷½·¨... 20
1.4.2 Comparable ½Ó¿Ú... 25
1.4.3 ʵÏÖÔÀí... 26
1.4.4 ¸²Ð´hashCode() 32
1.5 Set. 35
1.5.1 ³£Ó÷½·¨... 35
1.5.2 ʵÏÖÔÀí... 39
1.6 ×ܽá:¼¯ºÏ¿ò¼ÜÖг£ÓÃÀà±È½Ï... 41
2 Á·Ï°... 42
3 ¸½Â¼£ºÅÅÐò... 43
¼¯ºÏ
1 ¼¯ºÏ¿ò¼Ü
1.1 ¼¯ºÏ¿ò¼Ü¸ÅÊö
1.1.1 ÈÝÆ÷¼ò½é
µ½Ä¿Ç°ÎªÖ¹£¬ÎÒÃÇÒѾѧϰÁËÈçºÎ´´½¨¶à¸ö²»Í¬µÄ¶ÔÏ󣬶¨ÒåÁËÕâЩ¶ÔÏóÒÔºó£¬ÎÒÃǾͿÉÒÔÀûÓÃËüÃÇÀ´×öһЩÓÐÒâÒåµÄÊÂÇé¡£
¾ÙÀýÀ´Ëµ£¬¼ÙÉèÒª´æ´¢Ðí¶à¹ÍÔ±£¬²»Í¬µÄ¹ÍÔ±µÄÇø±ð½öÔÚÓÚ¹ÍÔ±µÄÉí·ÝÖ¤ºÅ¡£ÎÒÃÇ¿ÉÒÔͨ¹ýÉí·ÝÖ¤ºÅÀ´Ë³Ðò´æ´¢Ã¿¸ö¹ÍÔ±£¬µ«ÊÇÔÚÄÚ´æÖÐʵÏÖÄØ£¿ÊDz»ÊÇҪ׼±¸×ã¹»µÄÄÚ´æÀ´´æ´¢1000¸ö¹ÍÔ±£¬È»ºóÔÙ½«ÕâЩ¹ÍÔ±ÖðÒ»²åÈ룿Èç¹ûÒѾ²åÈëÁË500Ìõ¼Ç¼£¬ÕâʱÐèÒª²åÈëÒ»¸öÉí·ÝÖ¤ºÅ½ÏµÍµÄйÍÔ±£¬¸ÃÔõô°ìÄØ£¿ÊÇÔÚÄÚ´æÖн«500Ìõ¼Ç¼ȫ²¿ÏÂÒƺó£¬ÔÙ´Ó¿ªÍ·²åÈëеļǼ? »¹ÊÇ´´½¨Ò»¸öÓ³ÉäÀ´¼Çסÿ¸ö¶ÔÏóµÄλÖ㿵±¾ö¶¨ÈçºÎ´æ´¢¶ÔÏóµÄ¼¯ºÏʱ£¬±ØÐ뿼ÂÇÈçÏÂÎÊÌâ¡£
¶ÔÓÚ¶ÔÏ󼯺ϣ¬±ØÐëÖ´ÐеIJÙ×÷Ö÷ÒªÒÔÏÂÈýÖÖ£º
u Ìí¼ÓеĶÔÏó
Ïà¹ØÎĵµ£º
ÃæÏò¶ÔÏó±à³ÌÓÐÈý¸öÌØÕ÷£¬¼´·â×°¡¢¼Ì³ÐºÍ¶à̬¡£
·â×°Òþ²ØÁËÀàµÄÄÚ²¿ÊµÏÖ»úÖÆ£¬´Ó¶ø¿ÉÒÔÔÚ²»Ó°ÏìʹÓÃÕßµÄÇ°ÌáϸıäÀàµÄÄÚ²¿½á¹¹£¬Í¬Ê±±£»¤ÁËÊý¾Ý¡£
¼Ì³ÐÊÇΪÁËÖØÓø¸Àà´úÂ룬ͬʱΪʵÏÖ¶à̬ÐÔ×÷×¼±¸¡£ÄÇôʲôÊǶà̬ÄØ£¿
·½·¨µÄÖØд ......
package homework02;
import java.util.Scanner;
/*
* ±àдÁ½¸öÀࣺAºÍB£¬ÀàA´´½¨µÄ¶ÔÏó¿ÉÒÔ¼ÆËãÁ½¸öÕýÕûÊýµÄ×î´ó¹«Ô¼Êý£¬ÀàB´´½¨µÄ
* ¶ÔÏó¿ÉÒÔ¼ÆËãÁ½¸öÊýµÄ×îС¹«±¶Êý¡£ÒªÇó£ºÀàBÖÐÓÐÒ»¸ö³ÉÔ±±äÁ¿Ê±ÓÃÀàAµÄÉùÃ÷¶ÔÏó¡£
*/
public class A {
private int m;
private int n;
public A(){
this.intput();
......
×÷ÕߣºÐûÕ×Åô
------------------------------------------------------------------------------------------------------------------------------------------
¹¤×÷µÚÒ»²½£ºÊìϤMyEclipseµÄ»·¾³ÒÔ¼°Ö÷Òª¹¦ÄÜ¡£
¹¤×÷µÚ¶þ²½£º½¨Á¢Êý¾Ý¿âÁ¬½Ó
Êý¾Ý¿â£ºMySQL
1¡¢MySQLµÄÅäÖÃÓëÎÊÌâ½â¾ö
Ïê¼ûÎ ......
public class Regex {
/**
* ¼ì²éemailÊäÈëÊÇ·ñÕýÈ·
* ÕýÈ·µÄÊéд¸ñʽΪ username@domain
* @param value
* @return
*/
public boolean checkEmail(String value, int length) {
return value.matches("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)* ......