java ¹Ø¼ü×Ö
Java¹Ø¼ü×Ö£¨keywords£©
abstract default if private this
boolean do implements protected throw
break double import public throws
byte else instanceof return transient
case extends int short try
catch final interface static void
char finally long strictfp volatile
class float native super while
const for new switch
continue goto package synchronized
ÒÔÉÏÊÇjava specificationsÖж¨ÒåµÄkeywords£¬Ò»¹²48¸ö£¬ÆäÖг£¼ûµÄÈý¸ö¿´ËÆÊǹؼü×ÖµÄtrue, false, null,¶¼²»Êǹؼü×Ö£¬¶øÊÇ×÷Ϊһ¸öµ¥¶À±êʶÀàÐÍ¡£
ÆäÖУ¬²»³£Óõ½µÄ¹Ø¼ü×ÖÓУºconst£¬goto£¬native£¬strictfp£¬transient£¬volatile¡£
constºÍgotoΪjavaÖеı£Áô×Ö¡£
1. native
nativeÊÇ·½·¨ÐÞÊηû¡£Native·½·¨ÊÇÓÉÁíÍâÒ»ÖÖÓ
Ïà¹ØÎĵµ£º
JAVAרҵÊõÓO
API£ºJava ApplicationProgrammingInterface API£¨Ó¦ÓóÌÐò½Ó¿Ú£©ÊÇÊÂÏÈдºÃµÄ´úÂë,
×éÖ¯µ½Ïà¹Ø°ü¡£ÀýÈç Applet ºÍ AWT °ü°üÀ¨½¨Á¢×ÖÌå¡¢²Ëµ¥¡¢°´Å¥µÄÀࣨCLASS£©£¬
È«²¿µÄJava API±»°üº¬ÔÚJavaTM 2 Stan ......
Ò»¸öjavaÎļþÖУ¬ÓÐÇÒÖ»ÓÐÒ»¸öpublicÀà
float ff= 1.3f;(4B)
int 4B;
long 8B;
double 8B;
byte Ò»×Ö½ÚÕûÐÍ
char 2B
Êý×é
int num[] = new int[3];
int[] num;
num = new int[3];
int [] num = new int[]{1,2,3};
int [][] num;
num = new int[3][4];
//²»Í¬³¤
num = new int[3][];
num[0] = new int[5]; ......
JSP£ºjavascript ºÍ struts²¿·Ö
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td>
<span class="txt1">Èý¼¶µ¥Î»£º</span>
<html:select property="oilarea" style="width:182" styleId="area" onchange="javascript:fillWell()"&g ......
/*´Ó·þÎñÆ÷ÖÐÏÂÔØÎļþµ½±¾µØ*/
/*url:Îļþ´æ·ÅÔÚ·þÎñÆ÷µÄµØÖ·£»target:Òª±£´æµÄ·¾¶*/
public String DownloadFile(String url,String target){
URLConnection con=null;
URL theUrl=null;
try {
theUrl=new URL(url);//½¨Á¢µØÖ·
......
Ò». ʲôÊÇNative Method
¼òµ¥µØ½²£¬Ò»¸öNative Method¾ÍÊÇÒ»¸öjavaµ÷Ó÷Çjava´úÂëµÄ½Ó¿Ú¡£Ò»¸öNative MethodÊÇÕâÑùÒ»¸öjavaµÄ·½·¨£º¸Ã·½·¨µÄʵÏÖÓÉ·ÇjavaÓïÑÔʵÏÖ£¬±ÈÈçC¡£Õâ¸öÌØÕ÷²¢·ÇjavaËùÌØÓУ¬ºÜ¶àÆäËüµÄ±à³ÌÓïÑÔ¶¼ÓÐÕâÒ»»úÖÆ£¬±ÈÈçÔÚC£«£«ÖУ¬Äã¿ÉÒÔÓÃextern "C"¸æÖªC£«£«±àÒëÆ÷È¥µ÷ÓÃÒ»¸öCµÄº¯ ......