JavaÖеÄÖµ´«µÝ
ÔÚJavaÖз½·¨²ÎÊýµÄ´«µÝ£¬¶¼ÊÇÖµ´«µÝ£¬¶ÔÏó´«µÝÊǵØÖ· £¬»ù±¾Êý¾ÝÀàÐÍ´«µÝµÄÊÇÖµ¡£µØÖ·ºÍÖµ¶¼Öµ¡£
ÏÂÃæÒÔÒ»¸öÀý×ÓÀ´¿´ÄÚ´æÖеÄÊý¾Ý±ä»¯Çé¿ö
public class Test{
private String name;
public String getName(){
return this.name;
}
public void setName(String name){
this.name = name;
}
public callMethod(Test test){
Test test1 = new Test();
test1.setName("456");
test.setName("123");
test = test1;
System.out.println("test name:"+test.getName());
}
public static void main(String []args){
Test t = new Test();
callMethod(t);
System.out.println("t name:"+t.getName());
}
}
ÔËÐнá¹û£º
test name:456
t name:123
ÄÚ´æ±ä»¯Çé¿öÈçÏÂͼ£º
£¨Í¼Ò»£©µ÷Ó÷½·¨Ö®Ç°Êµ¼ÊÉÏÊÇÉùÃ÷ÁËÁ½¸ö±äÁ¿ test ËüµÄ×÷ÓÃÓòÊÇ·½·¨ÄÚÓÐЧ
£¨Í¼¶þ£©callMethod(t); µ÷Ó÷½·¨£¬°ÑtµÄµÄµØÖ·¸øtest,ËûÃÇÖ¸Ïòͬһ¸ö¶ÑÄÚ´æµ¥Ôª£¬Ö´ÐÐÕâÁ½¸öÓï¾äÒÔºó
test1.setName("123");
test.setName("456"); ¶¼ÓÐÁ˳õʼֵ
£¨Í¼Èý£©Ö´ÐÐÓï¾ä test = test1; °Ñtest1µÄµØÖ·¸øtest test1ºÍtest ¶¼Ö¸Ïòͬһ¸ö¶ÑÄÚ´æµ¥Ôª
£¨Í¼ËÄ£©·½·¨µ÷ÓýáÊø£¬testºÍtest1ÄÚ´æ±»Êͷŵô
Ïà¹ØÎĵµ£º
ÔÚʵ¼ÊÏîÄ¿Öиø¶¨Ò»Îļþ¼Ð£¬µÃµ½Õâ¸öÎļþ¼ÐÏÂËùÓеÄÎļþÕâÑùµÄÐèÇó²¢²»ÊǺܶ࣬¸ü¶àµÄÊDzéÕÒ»òÊÇɾ³ýijһ¾ßÌåµÄÎļþ
import java.io.File;
import java.util.ArrayList;
public class FileTest {
private static ArrayList<String> filelist = new ArrayList<String>();
public stati ......
¹ÖÒìÖ®Ò»£º
connect(SocketAddress endpoint):Õâ¸ö·½·¨£¬³¢ÊÔÁ¬½Óserver¶Ë£¬Èç¹ûÁ¬½Ó²»ÉÏ£¬¾ÍÅ׳öIOExceptionÒì³£¡£Èç¹ûÁ¬½Ó³É¹¦ÁË£¬¾Í¼ÌÐøÖ´ÐÐÏÂÒ»²½µÄ´úÂë¡£
¹ÖÒìÖ®¶þ£º
boolean isConnected() :Õâ¸ö·½·¨µÄ½á¹û½ö½ö´ú±íÕâ¸ösocketÔø¾³É¹¦Á¬½Óµ½ÁËserver£¬µ«²¢²»±íʾÏÖÔÚÕâ¸öʱ¿ÌËüºÍserverÈÔ±£³ÖÁ¬½Ó״̬¡£
ÓÐ ......
¶ÔÓÚjavaµÄÍøÂç±à³ÌÊéÖÐÌÖÂÛµÄÈ«²¿¹éÄÉÆðÀ´ÓÐSocketµÄʹÓã¬DatagramSocketµÄʹÓã¬javaÓëCGIµÄÅäºÏʹÓã¬javaÁ¬½ÓÊý¾Ý¿âÒÔ¼°javaÖе÷ÓÃÔ¶³Ì·½·¨¡£
Ê×ÏÈÊÇSocketµÄʹÓ㬶ÔÓÚ·þÎñ¶ËÀ´Ëµ£¬Ó¦¸ÃÉùÃ÷µÄÊÇServerSocket¶ÔÏó£¬È»ºóʹÓÃSocket
accept()·½·¨½øÐÐ ......
ÎÒÔÚѧϰthinking in Java4 µÄʱºò£¬ÔÚ´´½¨×Ô¶¨Òå°üµÄʱºò£¬Åöµ½Á˺ܶà´íÎó£¬ÈÃÎÒÓôÃÆÁ˼¸Ì죬ͨ¹ýÔÚÍøÉϵÄ×ÊÁÏËÑË÷£¬°Ñ°üµÄ´´½¨¹ý³Ì¸ø´ó¼ÒÏêϸÁгöÀ´¡£
ÎÒÃÇÒÔthinking in Java4ÖеÄÀý×ÓΪÀý
´´½¨Á½¸öÀàVectorºÍList¡£½«±àÒëºóµÄVector.classºÍList.classÎļþ·ÅÔÚ°ünet.mindview.simpleÏÂ(¸Ã°üλÓÚc:\DOC\JavaT).
//Vec ......
Ò»¡£javaµÄÓÅÊÆ
1.ÃæÏò¶ÔÏó
2.¿çƽ̨
java×÷ΪһÖÖÍøÂçÓïÑÔ£¬ÆäÔ´´úÂë±»±àÒë³É.class×Ö½ÚÂ룬ÓÉjavaÐéÄâ»úÖ´ÐУ¬
3.¼òµ¥
Ò»£¬java·ç¸ñÀàËÆc++£¬c++³ÌÐòÔ±ÄܺܿìµØÕÆÎÕjava
¶þ£¬javaÞðÆúÁËÖ¸Õ룬½á¹¹£¬Ã¶¾ÙµÈÒ×Òý·¢ÄÚ´æÎÊÌâµÄ²Ù×÷
Èý£¬javaÌṩÁ˷ḻµÄapi£¬Äܹ»°ïÖúÎÒÃÇ¿ìËÙ¿ª·¢
4.½¡×³
Ò»¡£Ç¿ÀàÐ͵ģ¬ÀàÐͼì²éºÜÑ ......