cºÍjavaÖеĶþ½øÖÆÎļþ
×î½üÐèҪдһ¶Î³ÌÐò£¬Íê³ÉÒÔÏµĹ¤×÷£¬ÓÃjava½«Êý¾ÝÒÔ¶þ½øÖƵÄÐÎʽдÈëÎļþÖУ¬È»ºóÓÃC¶Á³ö´Ë¶þ½øÖÆÎļþ¡£
¿ªÊ¼µÄʱºòûÓп¼ÂÇ»úÆ÷µÄ×Ö½ÚÐò£¬Ö±½Ó¸ã³ösegment fault.ÏëÁ˺ܾ㬲ÅÃ÷°×ÔÀ´ÊÇjavaºÍCµÄ×Ö½ÚÐòÊDz»Ò»ÑùµÄ¡£
javaÖеÄ×Ö½ÚÐòÊÇbig endianµÄ£¬ËüÊÇÓë»úÆ÷Î޹صġ£¶øcµÄ×Ö»úÐòÊÇ»úÆ÷Ïà¹ØµÄ£¬¶øµ±Ç°ÓõĻúÆ÷ÊÇx84_64½á¹¹£¬ÊÇlittle endianµÄ£¬
ËùÒÔ³ö´í¾Í²»×ãΪÆæÁË¡£
±³¾°ÖªÊ¶£º
Ö÷»ú×Ö½ÚÐò
²»Í¬µÄCPUÓв»Í¬µÄ×Ö½ÚÐòÀàÐÍ ÕâЩ×Ö½ÚÐòÊÇÖ¸ÕûÊýÔÚÄÚ´æÖб£´æµÄ˳Ðò Õâ¸ö½Ð×öÖ÷»úÐò
×î³£¼ûµÄÓÐÁ½ÖÖ
1£® Little endian£º½«µÍÐò×Ö½Ú´æ´¢ÔÚÆðʼµØÖ·
2£® Big endian£º½«¸ßÐò×Ö½Ú´æ´¢ÔÚÆðʼµØÖ·
LE little-endian
×î·ûºÏÈ˵Ä˼άµÄ×Ö½ÚÐò
µØÖ·µÍλ´æ´¢ÖµµÄµÍλ
µØÖ·¸ßλ´æ´¢ÖµµÄ¸ßλ
Ôõô½²ÊÇ×î·ûºÏÈ˵Ä˼άµÄ×Ö½ÚÐò£¬ÊÇÒòΪ´ÓÈ˵ĵÚÒ»¹Û¸ÐÀ´Ëµ
µÍλֵС£¬¾ÍÓ¦¸Ã·ÅÔÚÄÚ´æµØַСµÄµØ·½£¬Ò²¼´ÄÚ´æµØÖ·µÍλ
·´Ö®£¬¸ßλֵ¾ÍÓ¦¸Ã·ÅÔÚÄÚ´æµØÖ·´óµÄµØ·½£¬Ò²¼´ÄÚ´æµØÖ·¸ßλ
BE big-endian
×îÖ±¹ÛµÄ×Ö½ÚÐò
µØÖ·µÍλ´æ´¢ÖµµÄ¸ßλ
µØÖ·¸ßλ´æ´¢ÖµµÄµÍλ
Ϊʲô˵ֱ¹Û£¬²»Òª¿¼ÂǶÔÓ¦¹Øϵ
Ö»ÐèÒª°ÑÄÚ´æµØÖ·´Ó×óµ½ÓÒ°´ÕÕÓɵ͵½¸ßµÄ˳Ðòд³ö
°ÑÖµ°´ÕÕͨ³£µÄ¸ßλµ½µÍλµÄ˳Ðòд³ö
Á½Õ߶ÔÕÕ£¬Ò»¸ö×Ö½ÚÒ»¸ö×Ö½ÚµÄÌî³ä½øÈ¥
Àý×Ó£ºÔÚÄÚ´æÖÐË«×Ö0x01020304(DWORD)µÄ´æ´¢·½Ê½
ÄÚ´æµØÖ·
4000 4001 4002 4003
LE 04 03 02 01
BE 01 02 03 04
Àý×Ó£ºÈç¹ûÎÒÃǽ«0x1234abcdдÈëµ½ÒÔ0x0000¿ªÊ¼µÄÄÚ´æÖУ¬Ôò½á¹ûΪ
big-endian little-endian
0x0000 0x12 0xcd
0x0001 0x23 0xab
0x0002 0xab 0x34
0x0003 0xcd 0x12
x86ϵÁÐCPU¶¼ÊÇlittle-endianµÄ×Ö½ÚÐò.
ÍøÂç×Ö½ÚÐò
ÍøÂç×Ö½Ú˳ÐòÊÇTCP/IPÖй涨ºÃµÄÒ»ÖÖÊý¾Ý±íʾ¸ñʽ£¬ËüÓë¾ßÌåµÄCPUÀàÐÍ¡¢²Ù×÷ϵͳµÈÎ޹أ¬´Ó¶ø¿ÉÒÔ±£Ö¤Êý¾ÝÔÚ²»Í¬Ö÷»úÖ®¼ä´«ÊäʱÄܹ»±»ÕýÈ·½âÊÍ¡£ÍøÂç×Ö½Ú˳Ðò²ÉÓÃbig endianÅÅÐò·½Ê½¡£
ΪÁ˽øÐÐת»» bsd socketÌṩÁËת»»µÄº¯Êý ÓÐÏÂÃæËĸö
htons °Ñunsigned shortÀàÐÍ´ÓÖ÷»úÐòת»»µ½ÍøÂçÐò
htonl °Ñunsigned longÀàÐÍ´ÓÖ÷»úÐòת»»µ½ÍøÂçÐò
ntohs °Ñunsigned shortÀàÐÍ´ÓÍøÂçÐòת»»µ½Ö÷»úÐò
ntohl °Ñunsigned longÀàÐÍ´ÓÍøÂçÐòת»»µ½Ö÷»úÐò
ÔÚʹÓÃlittle endianµÄϵͳÖÐ ÕâЩº¯Êý»á°Ñ×Ö½ÚÐò½øÐÐת»»
ÔÚʹÓÃbig endianÀàÐ͵ÄϵͳÖÐ ÕâЩº¯Êý»á¶¨Òå³É¿Õºê
ͬÑù ÔÚÍøÂç³ÌÐò¿ª·¢Ê± »òÊÇ¿çƽÌ
Ïà¹ØÎĵµ£º
JavaÊý×éÊÇÒ»¸öJava¶ÔÏó£¬Êý×éµÄ³¤¶ÈÊǹ̶¨µÄ£¬ÔÚͬһ¸öÊý×éÖÐÖ»Äܹ»´æ·ÅÏàͬÀàÐ͵ÄÊý¾Ý£¬Êý×é¿ÉÒÔ´æ·Å»ù±¾ÀàÐ͵ÄÊý¾Ý£¬Ò²¿ÉÒÔ´æ·ÅÒýÓÃÀàÐ͵ÄÊý¾Ý¡£ÔÚ´´½¨Êý×é¶ÔÏóʱ£¬±ØÐëÖ¸¶¨Êý×é¶ÔÏóµÄ³¤¶È£¬Êý×éÒ»µ©´´½¨£¬ËüµÄ³¤¶È¾Í²»ÄÜÔÙ±ä
£¨1£©´´½¨Êý×é¶ÔÏ󣨼´newÒ»¸öÊý×éʱ£©ÒªÖ¸¶¨Êý×éµÄ³¤¶È£¬Êý×éµÄ³¤¶ÈÒ»µ©Ö¸¶¨ ......
Throwable
Throwable ÀàÊÇ Java ÓïÑÔÖÐËùÓдíÎó»òÒì³£µÄ³¬Àà¡£Ö»Ó屶ÔÏóÊÇ´ËÀࣨ»òÆä×ÓÀàÖ®Ò»£©µÄʵÀýʱ£¬²ÅÄÜͨ¹ý Java ÐéÄâ»ú»òÕß Java throw Óï¾äÅ׳ö¡£ÀàËƵأ¬Ö»ÓдËÀà»òÆä×ÓÀàÖ®Ò»²Å¿ÉÒÔÊÇ catch ×Ó¾äÖеIJÎÊýÀàÐÍ¡£
Á½¸ö×ÓÀàµÄʵÀý£¬Error ºÍ Exception£¬Í¨³£ÓÃÓÚָʾ·¢ÉúÁËÒì³£Çé¿ö¡£Í¨³££¬ÕâЩʵÀýÊÇÔÚÒì³£Çé ......
¼Ç¼һÏÂ
Java ACC
Java ACC¹æ·¶¶¨ÒåÁËÊÚȨ²ßÂÔÄ£¿éºÍJ2EEÈÝÆ÷Ö®¼äµÄʵÏֹ淶£¬ÕâÑùÈÝÆ÷°²È«ÌṩÕ߾ͿÉÒÔ¸ù¾Ý²Ù×÷»·¾³µÄÒªÇóÌṩJ2EEÈÝÆ÷µÄÊÚȨ¹¦ÄÜ¡£
Java ACC¹æ·¶·ÖΪÈý¸ö²¿·Ö£¬·Ö±ðÊÇ£ºÌṩ×ÅÅäÖù淶£¬°²È«²ßÂÔÅäÖù淶£¬²ßÂÔÅжϺÍÖ´Ðй淶¡£ÕâÈý¸ö²¿·Ö×éºÏÔÚÒ»Æð¹²Í¬ÃèÊöÁËÊÚȨÌṩÕߵݲװºÍÅäÖã¬J2EEÈÝÆ÷ʹÓÃÕß ......
1.java project»·¾³£¬Ê¹ÓÃjava.ioÓÃÏà¶Ô·¾¶¶ÁÈ¡ÎļþµÄÀý×Ó£º
*Ŀ¼½á¹¹£º
DecisionTree
|___src
|___com.decisiontree.Sampl ......
ÔÚ½øÐÐMISϵͳ¿ª·¢¹ý³ÌÖÐ,´ÓÅäÖÃÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢ÊÇÿһ¸öϵͳ±ØÐë¾ß±¸µÄ¹¦ÄÜ,ÀýÈç,ÎÒÃÇÒªÅäÖöÁÈ¡Êý¾Ý¿âÅäÖÃÐÅÏ¢,°üÀ¨Çý¶¯³ÌÐòÃû¡¢Á¬½Ó×Ö·û´®£¬Óû§Ãû£¬¿ÚÁîµÈÐÅÏ¢£¬ÓÉÓÚÕâЩÐÅÏ¢»áËæ×ÅÓû§µÄ²»Í¬¶ø·¢Éú¸Ä±ä£¬ËùÒÔ²»ÄÜÖ±½Ó°Ñ²ÎÊýдÔÚ³ÌÐòÖУ¬½«ÆäдÈëÅäÖÃÎļþ£¬È»ºóÔÚÓ¦ÓóÌÐòÖжÁÈ¡ÅäÖÃÐÅÏ¢²¢¼ÓÒÔʹÓã¬ÊÇÒ»¸ö³É ......