ƥ

ƥꡧJAVA

ƥ:
Javaץߥ󥰴ٶ裳
Ǥ
ǤƤޤ֥͡饹פǤΥȥϡ֥饹ñ򤹤롣
ȤȤǡޤΤ餤ȤȤǡ

ѿ
ѿַˤäޤ륵ʬΥݤ뤳
ַäƽ꤬˽פʵޤ

ѿν
ѿˤäƳݤ줿ͤ񤭹ǡƤѿƤפ뤳
פǤ͡ѿνȤѿͤ뤳ȡǤ͡
Ƥդޤơ֥饹פȤǰо줹櫓Ǥ͡
Ȥ櫓ǻǤ

֥饹פȤȤѿȤ߹碌ҤȤĤѿǤ뤫Τ褦˰롣
ؤ󤫤䤳ʤΤǤޤǤ뤳Ȥ륤᡼ޤ͡ʬ䤳ʤ롣餳ܤȡ
ơ֥饹פȤˤϤޤ֥饹פʤƤϤʤʤ

[sourcecode language="plain"]Class GeographicInfo {
double latitude;
double longitude;
}
[/sourcecode]
ʴClassפĤƥ饹̾򵭽Ҥʡ饹̾Ƭʸ

饹Ȥ硢Υ饹Ǥ뤳Ȥ롣

[sourcecode language="plain"]class GeographicInfo {
double latitude;
double longitude;
}
public class UsingGeographicInfo {
public static void main( String args[] ) {
GeographicInfo g;
g = new GeographicInfo();
g.latitude = 35.66;
g.longitude = 139.75;

System.out.println(g.latitude);
System.out.println(g.longitude);
}
}[/sourcecode]
GeographicInfo g;פȤդʷǤץߥƥַʤint g;פʤɤǤ͡
ѿgƳݤϡ饹¸ߤdoubleĤΤ8byte216byteǤϤʤ٤ƤΥ饹ѿϡɥɥ쥹ɤǼ뤿˻ȤΤǡJavaǡɥɥ쥹ɤɽ魯4byteΥ꤬ݤȤΤȡ
󡢤ʤȤʤ狼äɥɥ쥹ɤäʬäȰääJavaǤϥɥ쥹4byteɽ魯äƤȤǤ

饹ȤȤѿȤ̤Ȥ礬ɬפˤʤ롣
g = new GeographicInfo();פäƤʴ櫓Ǥ͡ˤäƽƥ饹¸ߤ16byte꤬ݤǤȡơ饹ɬפʥΰݤ뤳Ȥ֥󥹥󥹲פȤȡơ¸ߤ륯饹μΤΤȤ֥󥹥󥹡instanceơˡפȤ֥֥ȡobjectʪΡˡפȸƤ֡
դդࡣ
饹줿ѿΤȤ֥ѿפȤ֥եɡפȸƤ֡
ȤˤץåȡǤѿglatitudelongitudeΤȤǤ͡
JavaǤϡ饹Τ褦Ƭɥ쥹򻲾ȤƼºݤѿ˥ѿηΤơֻȷפȸƤ֡
ܸȤƤ񤷤Ǥ͡οޤʤΤǤ
[sourcecode language="plain"]
class SimpleClass {
int x;
}
public class ExchangeReferences {
public static void main( String args[] ) {
SimpleClass a = new SimpleClass();
SimpleClass b = new SimpleClass();

a.x = 123;
b.x = 456;

b = a;

System.out.println(b.x);
}
}
[/sourcecode]
̤ϡ






C:\DOCUME~1\MYDOCU~1\MYJAVA~1>javac
ExchangeReferences.javaC:\DOCUME~1\MYDOCU~1\MYJAVA~1>java
ExchangeReferences
123

C:\DOCUME~1\MYDOCU~1\MYJAVA~1>

ǤʤȤʤ123פˤʤΤϤ狼Ǥb=aפΤȤǾ񤭤줿Ȥ󤸤Ǥ͡¿ʬ줬a=bפäޤ̤Ϥޤֻ͡ȷʥ饹ˡפѿϤޤǤ̾פǤ뤫ȤȤȻפΤǤäդȤ뤳ȤϤǤޤ󡣡ȤꤢΤȤϤɤȤȤޤ
ΤޤޤĤޤŤ餳⤦٤äؽʤȤȤǡ

ϡʴǤ֥饹סơֻȷ׸դȤʣʥ᡼ޤ
äҤȤĤҤȤƬƤȴФȤƤ狼äƤΤȻפޤҤȤĤĤäȤĤޤŤޤˤɤäƤߤʴǤäƤФȡλJavaڤǤǤ
ʾ塢ޤ򿼤ơ

ƥ:
³ޤꡢJavaץߥ󥰤νٶ򤷤Ƥޤ

ơϡѿפǤޤ

伫ȺޤǡʥץȸActionScript2.0,Javascript,PHP,Pythonʤɡˤ
꤫äƤΤDzȤʤѿˤĤƤ򤷤ƤĤǤ
פͤȢΤ褦ʴǰŪ˳ǼƤߤʡʤ󤸤ǡ
󤳤εɤѿΤäªȤܼȤ館褦
ܤ餦֤ǡƱˤʤ󤫤ޤޤǤѿªä꤭äƴޤ
ʤʤǡȤꤢƤޤ



ѿȤϥɬפʬݤȤȡ


줬ޤܤ餦äǤɡ˿ĤƤƤʤƬȤޤ
Ȣפ㤨äϤޤ㤨ääȡƼ㴳ѿγǰ狼Ť餯Ƥʤȡ
Ǥ⡢ʬȤץڤäȤʤƾ嵭Τ褦ˡѿȤϥפƤ򤷤⤷ʤǤऺȤʤȻפޤǤ⡢εΰϢȿޤ򸫤ǤΤȡޤȤˤʬϤʤ󤫤ä꤭ޤơActionScript2.03.0ˤʤäȤѿηꤷʤ㤤ʤʤäơʤɤȻפäƤΤϥݤ뤿äΤˤäƽ᤯뤿äΤʡȻפäȤޤ


a = 1;ˤϡ1פͤ줿櫓ǤϤʤ

ѿ

嵭βߤƤФʤȤʤ᡼Ǥ뤫Ȥ⤦ΤǤƱ֣פǤѿηƤͤȤȤǤintʤ00000001סbyteʤ01פǤܤ餦Ǥ͡⤷äФʤ


















































̾ ͤϰ
byte 1bytes -128+127
short 2bytes -32768+32767
int 4bytes -2147483648+2147483647
long 8bytes -9223372036854775808+9223372036854775807
ư float 4bytes 3.40282347E+381.40239846E-45
double 8bytes 1.79769313486231570E+3804.94065645841246544E-324
ʸ char 2bytes 065535Unicodeɽ
boolean 1bytes truefalse

ơ嵭ɽˤ褦㤨Сintפηꤹȡ4bytesפΥ꤬ݤȤΤȡ

ѿʤǼ¹Ԥȥ顼ˤʤ롣

󡢤ܤʡ뤿ˤϤʤˤͤФȤȤǤ͡

intbyteʤɤηΤƥץߥƥַʴܥǡˤȸƤ֡

֥ץߥƥ֡פȤϱѸǡָŪʡפȤ̣ǤCPUľܥƤɤ߽񤭤Ʒ׻Ȥ֥ץߥƥ֡פӤǻȤ뤫Ǥդդࡢ줫֥ץߥƥ֡פȸƤӥӤʤʤꤽǤ



ʴǡʾܤ餦ΡѿPart1Ǥ

ƥ:
ΥȤ򸫤ʤJavaΥץߥ󥰤δäٶƤޤ

ʤJavaäơ

äơƯƤ֥ӥβҤǤJavaȤäƤ

ScalaLiftäƽФƤƤ뤷Scalaٶ⤢뤷Scalaٶ̤ٶ˻äɡJava狼ʤȥץ󥫥ץȻפScalaȤ˾٤줿ʤ

ʤɿäٶƤޤ

֥ǥʡǤޤɬפȤ⤤뤫⤷ޤ󤬡
ϤꡢJavaȤκȤܼŪʽ򾯤Ǥ狼äƤȡ
JavaץޤȰƯˤޤäǤ󤸤ʤȻפȤ⤢äƤٶǤ

ƯƤJavaץޤκǤݤ˻ĤäƤդ
̾ˤϺʤ㡪
ǤޤޤDzȤʤե̾ĤƤͤ˹ߤƤΤ褦ʸդǤ

ƥ֥ǥʡä̾άΤ򹥤image = img ȤˤΤǤ
ΥץޤϤ⹥ޤʤȤդˤääƤޤ
ͳȤƤJavaκˡȤƾĹˤʤäƤ̣Τ狼̾ΤĤ򤹤ߤʤȤȤȤǡΤʤȤͤΥե򿨤ˤ狼ʤʤäƤޤȤΤȤǤޤˤ̤ȡ

衢̾Ĥݤϡֺפ褦˵ĤƤޤDTPǤϤäȼȴ̣ǤʾСˡ

ʤʤǡĹ֤ˤʤޤٶȤФƤʤȻפäȤ򻨵ޤ



ץˤϥѥ鷿ȥ󥿥ץ꥿롣


ʤ󤫤դȤФƤʤäΤǤPHPJavascriptϥ󥿥ץ꥿CJavaϥѥ鷿ȤȤǤ͡ŪդưŪդȤߤǤѥȤϥե¹ԲǽʷΥեѴץΤȤǤơJavaΥѥϥեץब¹ԲǽʷΥեˤѴ֥ɤ߽ФȤΤȡƤΤޤޤǤCPUǤʤΤǡ֥СޥפȤȤäƼ¹Ԥ뤽Ǥ⤷Ƥ줬JavaVMΤȤ


¹Բǽʥե뤿ΥץޤȤơֳȯĶפȤ

Java 2 SDKΤȤǤ͡դդࡣJavaγȯĶJDKפȸƤֻ⤢롣

.javaפΥե¹Ԥȡ.classץե뤬롣

줬ѥ뤹뤳ȡJavaץޤΥǥȥåפ.javaʳ.class̤ˤäΤϤäΤ

Javaˤϥץꥱۤɬפʥץʤ򽸤᤿֥ѥåפȤȤߤ롣

System.out.printlnפΤ褦ʸⳫȯĶɸѰդ줿֥ѥåפȤäƤ롣ƴŪʥѥåʥѥåˤѹƤϤʤСޥϥѥ餬֥ɤȡ餫Ѱդ줿ѥå֥ɤξᤷƥץ¹Ԥ롣ƥѥå֥ɤrt.jarȤե˳ǼƤ롣Сޥɬפ֥ɤФƼ¹ԤƤ롣





ʾ塢˽νǤ
ʬʤλǤScalaLiftܻؤƥĥٶƤ
ʻ˷ˤʤޤ褦ˡ
äƤδ֡PythonGoogleAppEngineȤäȤƤäƴǤ͡ʾС
Ǥ⤭äJavaؤ٤ФˤƤ뵤ޤ

ΥڡΥȥåץ

Ф