Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaÖÐfinalµÄÓ÷¨

Ðí¶à³ÌÐòÉè¼ÆÓïÑÔ¶¼ÓÐ×Ô¼ºµÄ°ì·¨¸æËß±àÒëÆ÷ij¸öÊý¾ÝÊÇ“³£Êý”¡£³£ÊýÖ÷ÒªÓ¦ÓÃÓÚÏÂÊöÁ½¸ö·½Ã棺
(1) ±àÒëÆÚ³£Êý£¬ËüÓÀÔ¶²»»á¸Ä±ä
(2) ÔÚÔËÐÐÆÚ³õʼ»¯µÄÒ»¸öÖµ£¬ÎÒÃDz»Ï£ÍûËü·¢Éú±ä»¯
¶Ô
ÓÚ±àÒëÆڵij£Êý£¬±àÒëÆ÷£¨³ÌÐò£©¿É½«³£ÊýÖµ“·â×°”µ½ÐèÒªµÄ¼ÆËã¹ý³ÌÀï¡£Ò²¾ÍÊÇ˵£¬¼ÆËã¿ÉÔÚ±àÒëÆÚ¼äÌáÇ°Ö´ÐУ¬´Ó¶ø½ÚÊ¡ÔËÐÐʱµÄһЩ¿ªÏú¡£ÔÚJavaÖУ¬
ÕâЩÐÎʽµÄ³£Êý±ØÐëÊôÓÚ»ù±¾Êý¾ÝÀàÐÍ£¨Primitives£©£¬¶øÇÒÒªÓÃfinal¹Ø¼ü×Ö½øÐбí´ï¡£ÔÚ¶ÔÕâÑùµÄÒ»¸ö³£Êý½øÐж¨ÒåµÄʱºò£¬±ØÐë¸ø³öÒ»¸öÖµ¡£
ÎÞÂÛstatic»¹ÊÇfinal×ֶΣ¬¶¼Ö»ÄÜ´æ´¢Ò»¸öÊý¾Ý£¬¶øÇÒ²»µÃ¸Ä±ä¡£
Èô
Ëæͬ¶ÔÏó¾ä±úʹÓÃfinal£¬¶ø²»ÊÇ»ù±¾Êý¾ÝÀàÐÍ£¬ËüµÄº¬Òå¾ÍÉÔ΢ÈÃÈËÓеã¶ùÃÔºýÁË¡£¶ÔÓÚ»ù±¾Êý¾ÝÀàÐÍ£¬final»á½«Öµ±ä³ÉÒ»¸ö³£Êý£»µ«¶ÔÓÚ¶ÔÏó¾ä±ú£¬
final»á½«¾ä±ú±ä³ÉÒ»¸ö³£Êý¡£½øÐÐÉùÃ÷ʱ£¬±ØÐ뽫¾ä±ú³õʼ»¯µ½Ò»¸ö¾ßÌåµÄ¶ÔÏ󡣶øÇÒÓÀÔ¶²»Äܽ«¾ä±ú±ä³ÉÖ¸ÏòÁíÒ»¸ö¶ÔÏó¡£È»¶ø£¬¶ÔÏó±¾ÉíÊÇ¿ÉÒÔÐ޸ĵġ£
Java¶Ô´ËδÌṩÈκÎÊֶΣ¬¿É½«Ò»¸ö¶ÔÏóÖ±½Ó±ä³ÉÒ»¸ö³£Êý£¨µ«ÊÇ£¬ÎÒÃÇ¿É×Ô¼º±àдһ¸öÀ࣬ʹÆäÖеĶÔÏó¾ßÓГ³£Êý”Ч¹û£©¡£ÕâÒ»ÏÞÖÆÒ²ÊÊÓÃÓÚÊý×飬ËüÒ²
ÊôÓÚ¶ÔÏó¡£
ÏÂÃæÊÇÑÝʾfinal×Ö¶ÎÓ÷¨µÄÒ»¸öÀý×Ó£º
//: FinalData.java
// The effect of final on fields

class Value {
  int i = 1;
}

public class FinalData {
  // Can be compile-time constants
  final int i1 = 9;
  static final int I2 = 99;
  // Typical public constant:
  public static final int I3 = 39;
  // Cannot be compile-time constants:
  final int i4 = (int)(Math.random()*20);
  static final int i5 = (int)(Math.random()*20);
  
  Value v1 = new Value();
  final Value v2 = new Value();
  static final Value v3 = new Value();
  //! final Value v4; // Pre-Java 1.1 Error:
                      // no initializer
  // Arrays:
  final int[] a = { 1, 2, 3, 4, 5, 6 };

  public void print(String id) {
   &n


Ïà¹ØÎĵµ£º

java statement×÷ÓÃ


1¡¢´´½¨ Statement ¶ÔÏó
½¨Á¢Á˵½Ìض¨Êý¾Ý¿âµÄÁ¬½ÓÖ®ºó£¬¾Í¿ÉÓøÃÁ¬½Ó·¢ËÍ SQL Óï¾ä¡£Statement ¶ÔÏóÓà Connection µÄ·½·¨ createStatement ´´½¨£¬ÈçÏÂÁдúÂë¶ÎÖÐËùʾ£º
Connection con = DriverManager.getConnection(url, "sunny", "");
Statement stmt = con.createStatement();
ΪÁËÖ´ÐÐ Statement ¶ÔÏ󣬱»· ......

Java»ñÈ¡Oracle´æ´¢¹ý³ÌÖÐÖ´Ðвéѯ·µ»ØµÄ½á¹û¼¯

ͨ¹ýJAVAµ÷ÓÃORACLEµÄ´æ´¢¹ý³Ì£¬ÔÚORACLEµÄ´æ´¢¹ý³ÌÄÚ²¿×öÁËÒ»¸ö²éѯÔÚJAVAÖлñÈ¡¸Ã²éѯ½á¹û£¬Õâ¸öºÍSYBASE¡¢SQLSERVERµÄ»ñÈ¡²»Ò»Ñù£¬µÈÎÒµÄÏÂһƪÎÄÕÂÎÒ»á½éÉÜÈçºÎ»ñÈ¡SYBASE¡¢SQLSERVERÔÚ´æ´¢¹ý³ÌÖÐÖ´ÐÐÁ˲éѯºóÈçºÎ»ñÈ¡Æä½á¹û¼°´æ´¢¹ý³ÌµÄ±àд¡£
ÔÚOracleÖÐÐèÒª·µ»Ø²éѯ½á¹û¼¯£¬±ØÐ뽫ÆäÒÔÓαêµÄÐÎʽ·µ»Ø£¬µ«ÓαêÓÖ²»ÊÇ ......

¶à·¹é²¢ÅÅÐò¡¾JAVAʵÏÖ¡¿

¶ÔÔ¶Ô¶´óÓÚÄÚ´æµÄÊý¾Ý½øÐÐÍâÅÅÐò£¬Ôڶ෱ȽϵÄʱºòÓðÜÕßÊ÷ЧÂÊ»á¸ü¸ß¡£
package my.sort;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.F ......

´¿Java¶ÁÈ¡¡¢ÏÔʾ¡¢×ª»»wordÎĵµ(97~2007)¡¢htmlÎĵµ

´¿Java¶ÁÈ¡¡¢ÏÔʾ¡¢×ª»»wordÎĵµ(97~2007)¡¢htmlÎĵµ
ÏÂÔسÌÐò¿â
http://hgsqldoc.appspot.com/lib/hg.jar
Ö÷³ÌÐò¿â£¨±ØÐ룩
http://hgsqldoc.appspot.com/lib/poi.jar
½âÎödoc¸ñʽ
http://hgsqldoc.appspot.com/lib/itext.jar
Êä³öpdfºÍrtf
http://hgsqldoc.appspot.com/lib/fgio.jar
Êä³ösvg¡¢swf¡¢ps¡¢emf
¶ÁÈ ......

ÕýÔò±í´ïʽÔÚphp£¬java£¬javascriptÖзֱðÓ¦ÓÃ

ÔÚjavascriptÖÐÓ÷¨¾ÙÀý
var rule = /^\d+$/;
if(!rule.test(addform.rmb_price.value)) {
alert('rmb_price must be number');
addform.rmb_price.focus();
return false;
}
ÔÚphpÖÐÓ÷¨¾ÙÀý
$aa = "/^\d+$/";
if(preg_match($aa, "111")) {
echo "found";
}
ÔÚjavaÖÐÓ÷¨¾ÙÀý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ