java ÔËËã·û
ÔÚËãÊõÔËËã·û²¿·Ö£¬ÐèÒªÌرð×¢ÒâµÄÒ»¸öÓï·¨ÏÖÏóÊÇ“½úÉý”¡£½úÉýÖ¸µÍÓÚintµÄ3ÖÖÊý×ÖÀàÐÍ(byte¡¢shortºÍchar)½øÐÐËãÊõÔËËãºó£¬½á¹û»á×Ô¶¯ÌáÉý³ÉintÀàÐÍ¡£Ê¾Àý´úÂëÈçÏ£º
byte b1 = 10;
byte b2 = 20;
byte b3 = b1 + b2; //Óï·¨´íÎó£¬ÀàÐͲ»Æ¥Åä
int n = b1 + b2; //»òÕß byte b3 = (byte)(b1 + b2);
×îºó˵һÏÂ&&ºÍ&µÄÇø±ð£¬ÆäʵÔÚ½øÐÐÂß¼ÓëÔËËãʱ£¬¼È¿ÉÒÔʹÓÃ&&Ò²¿ÉÒÔʹÓÃ&£¬ÔÚ¹¦ÄÜÉϱ¾ÉíûÓÐÇø±ð¡£Á½ÕßÇø±ðµÄλÖÃÔÚ£¬¶ÔÓÚ&À´Ëµ£¬Èç¹û×ó²àÌõ¼þΪfalse£¬Ò²»á¼ÆËãÓÒ²àÌõ¼þµÄÖµ£¬¶ø¶ÔÓÚ&&À´Ëµ£¬Èç¹û×ó²àµÄÌõ¼þΪfalse£¬Ôò²»¼ÆËãÓÒ²àµÄÌõ¼þ£¬ÕâÖÖÏÖÏó±»³Æ×÷¶Ì·ÏÖÏó¡£
ʾÀý´úÂ룺
int n = -1;
boolean b1 = (n >= 0) && (n < 10);
boolean b2 = (n >= 0) & (n < 10);
Ôò¶ÔÓÚµÚ¶þÐдúÂëÀ´Ëµ£¬Á½¸öÌõ¼þ¶¼½«±»¼ÆË㣬¶ø¶ÔÓÚµÚÈýÐдúÂëÀ´Ëµ£¬ÒòΪn >= 0Õâ¸öÌõ¼þ²»³ÉÁ¢£¬Ôòn < 10¸ù±¾²»»á±»Ö´ÐС£µ±È»£¬Á½Õߵõ½µÄ×îÖÕ½á¹ûÊÇÒ»ÑùµÄ¡£
¶ÔÓÚÏÖÔڵĴúÂëÀ´Ëµ£¬Çø±ð²»´ó£¬µ«ÊÇÈç¹ûºóÐøµÄÌõ¼þÊÇÒ»¸ö·½·¨(·½·¨µÄ¸ÅÄîºóÐø½«½éÉܵ½)£¬Ôò½«Ó°Ïì³ÌÐòÂß¼¡£
ÓÉÓÚ¼ÆËã»úÄÚ²¿µÄÊý¾Ý¶¼ÒÔ¶þ½øÖƵÄÐÎʽ´æÔ
Ïà¹ØÎĵµ£º
package com.allywll.core.exec.base;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent. ......
»º³åÇøÄÚ²¿Ï¸½Ú
״̬±äÁ¿
״̬±äÁ¿ÊÇÇ°Ò»½ÚÖÐÌáµ½µÄ"ÄÚ²¿Í³¼Æ»úÖÆ"µÄ¹Ø¼ü¡£Ã¿Ò»¸ö¶Á/д²Ù×÷¶¼»á¸Ä±ä»º³åÇøµÄ״̬¡£Í¨¹ý¼Ç¼ºÍ¸ú×ÙÕâЩ±ä»¯£¬»º³åÇø¾ÍÄܹ»ÄÚ²¿µØ¹ÜÀí×Ô¼ºµÄ×ÊÔ´¡£
¿ÉÒÔÓÃÈý¸öÖµÖ¸¶¨»º³åÇøÔÚÈÎÒâʱ¿ÌµÄ״̬£º
position
limit
capacity
Position
»º³åÇøʵ¼ÊÉϾÍÊÇÃÀ»¯Á˵ÄÊý×é¡£ÔÚ´ÓͨµÀ¶Áȡʱ£¬Äú ......
JavaÏß³ÌÊÇJavaÓïÑÔÖÐÒ»¸ö·Ç³£ÖØÒªµÄ²¿·Ö£¬Java5֮ǰ£¬¶àÏ̵߳ÄÓïÑÔÖ§³Ö»¹ÊDZȽÏÈõµÄ£¬ÄÚÈÝÒ²½ÏÉÙ£¬Ð´Ò»¸ö¸´ÔӵĶàÏ̳߳ÌÐòÊÇÏ൱ÓÐÌôÕ½ÐԵġ£
ÔÚJava5ÒÔºó£¬Java¶Ô¶àÏß³Ì×öÁ˺ܶàÀ©Õ¹£¬À©Õ¹²¿·Ö³Æ֮Ϊ²¢·¢°ü¡£Õⲿ·ÖÄÚÈÝ´ó´óÔöÇ¿ÁËJava¶àÏ̱߳à³ÌµÄÄÜÁ¦£¬Í¨¹ýʹÓÃJava5Ïß³ÌÐÂÌØÕ÷µÄAPI£¬¿ÉÒÔºÜÈÝÒ×µÄ×ö³ö¸´Ô ......
½ñÌì¿´ÁËһλǰ±²µÄÎÄÕÂhttp://blog.csdn.net/psyl/archive/2010/01/24/5250562.aspx
µÚÒ»Ìâ¾Í²»»á¡£°¥£¬Ôΰ¡¡£»ù´¡Ì«²î£¬ÐèÒª¼ÓÇ¿¡£
GoogleÁËһϠhttp://www.ibm.com/developerworks/cn/java/l-javaassertion/index.html ÕâƪÎÄÕ½éÉÜassertion,¸Ð¾õ²»´í£¬×ªÏµØÖ·¡£
SpringÒ²ÌṩÁ˶ÏÑԵŦÄÜ
org.springframew ......