flex ´¦Àíjavaºǫ́·µ»ØµÄJavaBean
¹ØÓÚflex´¦Àíjava ʵÌåbean£¬ÎÒÒ²²éÁ˺öà×ÊÁÏ£¬ÏÖÔÚÖÕÓڸ㶨£¬Ð´Ò»¸ö¼òµ¥µÄÀý×Ó£¬·ÖÏí¸ø´ó¼Ò
¸ßÊ־Ͳ»Óÿ´ÁË
/*studentʵÌåÀà=java*/
public class Student implements java.io.Serializable{
private String sNo;
private String sName;
get..
set..
}
/*flex asÀà Student.as*/
package flexas
{
[Bindable]
[RemoteClass(alias="com.Student")]
public class Student
{
public function Student()
{
}
public var SNo:String;
public var SName:String;
}
}
/*script ÎÒÊÇÔÚmxmlÀïдµÄ£¬µ±È»ÄãÒ²¿ÉÒÔ³é³öÀ´Ð´³ö.asÎļþ*/
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="100%" width="100%" creationComplete="choose()">
<mx:Script>
<![CDATA[
import flexas.Student;
function choose():void{
probiz.getBycode(tt.text);//ºǫ́ҵÎñ·½·¨
probiz.addEventListener(ResultEvent.RESULT,getPro);
}
function getPro(event:ResultEvent):void{
var pt:Student=Student(event.result);
Alert.show(pt.SName);
}
]]>
</mx:Script>
<!--ͨ¹ýRemoteObjectºÍjava½»»¥-->
<mx:RemoteObject id="probiz" destination="proBiz"/>
<mx:Text x="47" y="408" text="Text" width="98" height="69" id="tt"/>
</mx:Application>
Ïà¹ØÎĵµ£º
¶ÔÓÚjavaµÄÍøÂç±à³ÌÊéÖÐÌÖÂÛµÄÈ«²¿¹éÄÉÆðÀ´ÓÐSocketµÄʹÓã¬DatagramSocketµÄʹÓã¬javaÓëCGIµÄÅäºÏʹÓã¬javaÁ¬½ÓÊý¾Ý¿âÒÔ¼°javaÖе÷ÓÃÔ¶³Ì·½·¨¡£
Ê×ÏÈÊÇSocketµÄʹÓ㬶ÔÓÚ·þÎñ¶ËÀ´Ëµ£¬Ó¦¸ÃÉùÃ÷µÄÊÇServerSocket¶ÔÏó£¬È»ºóʹÓÃSocket
accept()·½·¨½øÐÐ ......
Ò»¡£javaµÄÓÅÊÆ
1.ÃæÏò¶ÔÏó
2.¿çƽ̨
java×÷ΪһÖÖÍøÂçÓïÑÔ£¬ÆäÔ´´úÂë±»±àÒë³É.class×Ö½ÚÂ룬ÓÉjavaÐéÄâ»úÖ´ÐУ¬
3.¼òµ¥
Ò»£¬java·ç¸ñÀàËÆc++£¬c++³ÌÐòÔ±ÄܺܿìµØÕÆÎÕjava
¶þ£¬javaÞðÆúÁËÖ¸Õ룬½á¹¹£¬Ã¶¾ÙµÈÒ×Òý·¢ÄÚ´æÎÊÌâµÄ²Ù×÷
Èý£¬javaÌṩÁ˷ḻµÄapi£¬Äܹ»°ïÖúÎÒÃÇ¿ìËÙ¿ª·¢
4.½¡×³
Ò»¡£Ç¿ÀàÐ͵ģ¬ÀàÐͼì²éºÜÑ ......
ΪÁËʵÏÖÁ½¸öÊý×Ö½øÐн»»»£¬ÎÒÃÇͨ³£¿ÉÒÔÀûÓÃλÔËËãÀ´ÊµÏÖ
C++³ÌÐò swap(int a ,int b){a^=b^=a^=b;}
JAVA³ÌÐò swap(int a, int b){ a^=b;b^=a;a^=b; }»òÕß{ b^=(a^=b) ; a^=b;}
Èç¹ûJAVAÓÃC++µÄʵÏÖ·½Ê½Ôò»áµÃµ½ bµÃµ½ÁËaµÄÖµ£¬µ«ÊÇaÏÖÔÚµÄֵȴ² ......
³£¿´µ½ºÜ¶àÈËÌÖÂÛjavaÖйØÓÚStringµÄÎÊÌâ,ÎÒÒ²¾ÍÓеãÐËȤÁË,¼øÓÚÍøÉϺܶàÈËдµÄ¶¼²î±ðºÜ´ó,
ͬÑùµÄÎÊÌⶼÊDz»Í¬µÄ˵·¨,ÎÒºÜÃÔºý,»¨ÁËÒ»ÍíÉ϶ÁÁËJava Virtual Machine SpecificationºÍ
The Java Language SpecificationµÄһЩÕ½Ú,×öÁ˺ܶàÊÔÑé,×ܽáÁËһϹØÓÚStringµÄÄÚÈÝ,»¹
ÓкܶàÄÚÈÝÎÒÒ²²»È·¶¨,ÔÚÏÂÃæÒ²¶¼Ìá³öÀ´ÁË,Ï ......
ÔÎÄ: http://forum.javaeye.com/viewtopic.php?t=17912§Ö÷µÄÎÊÌâÎʵĺ¬º¬ºýºý:flyjie¸ø³öÁ˷dz£ÏêϸµÄ½âÊÍ£¬²»¹ý¾ÍÊÇûÓнâÊÍStringʵÀý»¯µÄÌØÊâ·½ÃæÒÔ¼°Intern()·½·¨µÄº¬Òå----------------------------------------------------------------------------------------------------------------------------------------- ......