JAVA ¶à¶Ô¶àÀý×Ó
ʹÓÃÀ༯²»½ö¿ÉÒÔ±íʾ³öÒ»¶ÔÒ»µÄ¹ØÏµ£¬Ò²¿ÉÒÔ±íʾ³ö¶à¶Ô¶àµÄ¹ØÏµ¡£ÀýÈ磬һ¸öѧÉú¿ÉÒÔÑ¡¶àÃſγ̣¬Ò»Ãſγ̿ÉÒÔÓжà¸öѧÉú²Î¼Ó£¬ÄÇôÕâ¾ÍÊÇÒ»¸öµäÐ͵Ķà¶Ô¶à¹ØÏµ¡£
ÒªÍê³É±¾³ÌÐò£¬Ê×ÏÈÓ¦¸Ã¶¨ÒåÁ½¸öÀࣺѧÉúÐÅÏ¢ÀàStudent¡¢¿Î³ÌÐÅÏ¢ÀàCourse¡£ÔÚÒ»¸öѧÉúÀàÖдæÔÚÒ»¸ö¼¯ºÏ£¬±£´æÈ«²¿µÄ¿Î³Ì£»¶øÔڿγÌÀàÖÐÒ²Òª´æÔÚÒ»¸ö¼¯ºÏ£¬±£´æÈ«²¿µÄѧÉú¡£
·¶Àý£º¶¨ÒåѧÉúÀà
package org.lxh.demo13.execdemo02;
import java.util.ArrayList;
import java.util.List;
public class Student { // ¶¨ÒåѧÉúÀà
private String name ; // ¶¨ÒånameÊôÐÔ
private int age ; // ¶¨ÒåageÊôÐÔ
private List<Course> allCourses ; // ¶¨Ò弯ºÏ±£´æÈ«²¿¿Î³Ì
public Student(){// Î޲ι¹Ôì
this.allCourses = new ArrayList<Course>() ;// ʵÀý»¯List¼¯ºÏ
}
public Student(String name,int age){ // ͨ¹ý¹¹ÔìÉèÖÃÊôÐÔÄÚÈÝ
this() ; // µ÷ÓÃÎ޲ι¹Ôì
this.setName(name) ; // ÉèÖÃnameÊôÐÔÄÚÈÝ
this.setAge(age) ; // ÉèÖÃageÊôÐÔÄÚÈÝ
}
public String getName() {// È¡µÃnameÊôÐÔ
return name;
}
public void setName(String name) {// ÉèÖÃnameÊôÐÔ
this.name = name;
}
ÔÚѧÉúÀàÖдæÔÚÒ»¸öallCoursesµÄList¼¯ºÏ£¬ÕâÑùÔÚ³ÌÐòÔËÐÐʱ£¬Ò»¸öѧÉúÀàÖпÉÒÔ±£´æ¶à¸öCourse¶ÔÏó¡£
·¶Àý£º¶¨Òå¿Î³ÌÀà
package org.lxh.demo13.execdemo02;
import java.util.ArrayList;
import java.util.List;
public class Course { // ¶¨ÒåCourseÀà
private String name ; // ¶¨ÒånameÊôÐÔ
private int credit ; // ¶¨ÒåcreditÊôÐÔ£¬±íʾѧ·Ö
private List<Student> allStudents ; // ¶¨Ò弯ºÏ±£´æ¶à¸öѧÉú
public Course(){ // Î޲ι¹Ôì·½·¨
this.allStudents = new ArrayList<Student>() ;// ʵÀý»¯List¼¯ºÏ
}
public Course(String name,int credit){ // ÉèÖÃnameºÍcredit ÊôÐÔ
this() ; // µ÷ÓÃÎ޲ι¹Ôì
this.setName(name) ; // ÉèÖÃnameÊôÐÔ
this.setCredit(credit) ; // ÉèÖÃcreditÊôÐÔ
}
public String getName() { // È¡µÃna
Ïà¹ØÎĵµ£º
ÒýÑÔ£º´ÓÒ»¸öÅóÓѵÄblogת¹ýÀ´µÄ£¬ÀïÃæ½â¾öÁËÁ½¸öÀ§ÈÅÎҺܾõÄÎÊÌâ¡£ºÜÓоúµ·ê¸ÊÁصĸоõ¡£
ÖÐÈí¹ú¼Êµç×ÓÕþÎñ²¿Jeff Chi×Ü½á£¬×ªÔØÇë˵Ã÷³ö´¦¡£
¸ÅÊö£º
A.==¿ÉÓÃÓÚ»ù±¾ÀàÐͺÍÒýÓÃÀàÐÍ£ºµ±ÓÃÓÚ»ù±¾ÀàÐÍʱºò£¬ÊDZȽÏÖµÊÇ·ñÏàͬ£»µ±ÓÃÓÚÒýÓÃÀàÐ͵Äʱºò£¬ÊDZȽ϶ÔÏóÊÇ·ñÏàͬ¡£
&nb ......
mysqlÊýÖµ·¶Î§
tinyint -128~127 0~255
smallint -32768~32767 0~65535
mediumint -8388608~8388607 0~16777215
int -2147483648~2147483647 0~4294967295
bigint -9223372036854775808~9223372036854775807 0~18446744073709551615
javaÖÐ
byte ......
»á¡£ ËùνÄÚ´æÐ¹Â¶¾ÍÊÇÖ¸Ò»¸ö²»ÔÙ±»³ÌÐòʹÓõĶÔÏó»ò±äÁ¿Ò»Ö±±»Õ¼¾ÝÔÚÄÚ´æÖС£
javaµ¼ÖÂÄÚ´æÐ¹Â¶µÄÔÒòºÜÃ÷È·£º³¤ÉúÃüÖÜÆÚµÄ¶ÔÏó³ÖÓжÌÉúÃüÖÜÆÚ¶ÔÏóµÄÒýÓþͺܿÉÄÜ·¢ÉúÄÚ´æÐ¹Â¶£¬¾¡¹Ü¶ÌÉúÃüÖÜÆÚ¶ÔÏóÒѾ²»ÔÙÐèÒª£¬µ«ÊÇÒòΪ³¤ÉúÃüÖÜÆÚ¶ÔÏó³ÖÓÐËüµÄÒýÓöøµ¼Ö²»Äܱ»»ØÊÕ£¬Õâ¾ÍÊÇjavaÖÐÄÚ´æÐ¹Â¶µÄ·¢Éú³¡¾°¡£
&n ......
ÔÌûµØÖ·:
http://coolshell.cn/?p=2235
----------------ÎÒÊÇ×ÏÔ·×îÃȵķָîÏßXD--------------
¸ÅÊö£º
±¾ÎÄÖ÷ÒªÑо¿µÄÊÇJAVAµÄ×Ö·û´®Æ´½ÓµÄÐÔÄÜ£¬ÔÎÄÖеIJâÊÔ´úÂëÔÚ¹¦ÄÜÉϲ¢²»µÈ¼Û£¬µ¼ÖÂconcatµÄ²â
ÊÔÒâÒå²»´ó¡£²»¹ýÔ×÷ÕßÔÚÆÀÂÛÀ¸¸øÁËеÄconcat½á¹û£¬Èç¹ûÓÐÐËȤµÄͬѧ½¨Òé×Ô¼ºÐ޸ĴúÂë²âÊÔ¡£
ÔÎijö´¦:http://ww ......
½ñÌì¸øÎÒÃÇÉϿεÄÊÇ·ëÍþÀÏʦ£¬ÀÏʦÒÔǰ¹¤×÷µÄ¹«Ë¾ÊǶÔÈÕÈí¼þ¿ª·¢µÄ£¬Óн«½üÊ®ÄêµÄ¹¤×÷¾ÑéÁË£¬ÖÚËùÖÜÖª£¬ÈÕ±¾È˶Թ¤×÷ÒªÇóÊÇÊ®·ÖÑϽ÷µÄ£¬¾ÝÀÏʦËù˵£¬ÒÔǰÔÚ¹«Ë¾±àÂëµÄʱºòÒªÇóÊÇÒ»ÐдúÂëÒ»ÐÐ×¢ÊÍ£¬Èç¹ûûÓÐ×¢Ê͵ϰÔÚÉóºËµÄʱºòÊDz»»áͨ¹ýµÄ£¬Ã»ÓÐ×¢ÊÍÊǻᱻ°´ÕÕbug´¦ÀíµÄ£¬ËùÒÔÏÖÔÚÀÏʦÉÏ¿ÎÏÖ³¡±àÂëµÄʱºòÒ²ÊÇÐÐÐÐдעÊÍ£ ......