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

Java¾²Ì¬±äÁ¿µÄ³õʼ»¯£¨static¿éµÄ±¾ÖÊ£©

JavaÀàÖпÉÒÔ¶¨ÒåÒ»¸östatic¿éÓÃÓÚ¾²Ì¬±äÁ¿µÄ³õʼ»¯£»µ±ÀàµÄ¶¨ÒåÖв»º¬ÓÐstatic¿éʱ£¬±àÒëÆ÷»áΪ¸ÃÀàÌṩһ¸öĬÈϵÄstatic¿é£¬Ç°Ìá
ÊÇ´æÔÚ¾²Ì¬±äÁ¿µÄ³õʼ»¯²Ù×÷£»ÓÉÓÚ¾²Ì¬±äÁ¿ÊÇͨ¹ý¸³Öµ²Ù×÷½øÐгõʼ»¯µÄ£¬Òò´Ë¿ÉÒÔͨ¹ý¾²Ì¬º¯Êý·µ»ØÖµµÄ·½Ê½ÎªÆä³õʼ»¯£»ÀඨÒåÖпÉÒÔ´æÔÚ¶à¸östatic
¿é£¬¶øÇÒÔÚ±àÒëʱ±àÒëÆ÷»á½«¶à¸östatic¿é°´ÕÕ´úÂëµÄǰºóλÖÃÖØÐÂ×éºÏ³ÉÒ»¸östatic¿é¡£
ÔÚÍøÉÏ¿´µ½ÁËÏÂÃæµÄÒ»¶Î´úÂ룺
public class Test {
static {
_i = 20;
}
public static int _i = 10;

public static void main(String[] args) {
System.out.println(_i);
}
}
ÉÏÊö´úÂë»á´òÓ¡³öʲô½á¹ûÀ´ÄØ£¿10»¹ÊÇ20£¿±¾ÎĽ«ÒÔ´Ë´úÂëΪÒý×Ó£¬×ÅÖØÌÖÂÛһϾ²Ì¬±äÁ¿µÄ³õʼ»¯ÎÊÌâ¡£
ÎÊÌâ1£º
¾²Ì¬±äÁ¿ÈçºÎ³õʼ»¯
JavaÀàÖпÉÒÔ¶¨ÒåÒ»¸östatic¿é£¬ÓÃÓÚ¾²Ì¬±äÁ¿µÄ³õʼ»¯¡£È磺
public class Test {
public static int _i;
static {
_i = 10;
}
}
µ±È»×î³£Óõijõʼ»¯¾²Ì¬±äÁ¿µÄ²Ù×÷ÊÇÔÚÉùÃ÷±äÁ¿Ê±Ö±½Ó½øÐи³Öµ²Ù×÷¡£È磺
public class Test {
public static int _i = 10;
}
ÄÇôÉÏÊöÁ½ÀýÔÚ±¾ÖÊÉÏÓÐÊ²Ã´Çø±ðÂ𣿻شðÊÇûÓÐÇø±ð
¡£Á½Àý´úÂë±àÒëÖ®ºóµÄ×Ö½ÚÂëÍêȫһÖ£¬Í¨¹ý
“javap -c”²é¿´µ½µÄ×Ö½ÚÂëÈçÏ£º
public class Test extends java.lang.Object{
public static int _i;
public Test();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return
static {};
Code:
0: bipush 10
2: putstatic #2; //Field _i:I
5: return
}
ͨ¹ý×Ö½ÚÂ뻹¿ÉÒÔ¿´³ö£¬µ±ÀàµÄ¶¨ÒåÖв»º¬ÓÐstatic¿éʱ£¬±àÒëÆ÷»áΪ¸ÃÀàÌṩһ¸öĬÈϵÄstatic¿é¡£µ±È»ÕâÊÇÔÚº¬Óо²Ì¬±äÁ¿³õʼ»¯²Ù
×÷µÄǰÌáÏ¡£Èç¹û¾²Ì¬±äÁ¿Ã»Óгõʼ»¯²Ù×÷£¬Ôò±àÒëÆ÷²»»áΪ֮ÌṩĬÈϵÄstatic¿é¡£È磺
public class Test {
public static int _i;
}
Æä×Ö½ÚÂëµÄ±íÏÖÐÎʽΪ£º
public class Test extends java.lang.Object{
public static int _i;
public Test();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return
}
ÓÉÓÚ¾²Ì¬±äÁ¿ÊÇͨ¹ý¸³Öµ²Ù×÷½øÐгõʼ»¯µÄ£¬Òò´Ë¿ÉÒÔͨ¹ý¾²Ì¬º¯Êý·µ»ØÖµµÄ·½Ê½ÎªÆä³õʼ»¯¡£È磺
public class Test {
public sta


Ïà¹ØÎĵµ£º

java ÖÐ set map table list µÄ×ܽá

1.Collection List Set Map Çø±ð¼ÇÒä
ÕâЩ¶¼´ú±íÁËJavaÖеļ¯ºÏ£¬ÕâÀïÖ÷Òª´ÓÆäÔªËØÊÇ·ñÓÐÐò£¬ÊÇ·ñ¿ÉÖØ¸´À´½øÐÐÇø±ð¼ÇÒ䣬ÒÔ±ãÇ¡µ±µØÊ¹Ó㬵±È»»¹´æÔÚͬ²½·½ÃæµÄ²îÒ죬¼ûÉÏһƪÏà¹ØÎÄÕ¡£
 
ÓÐÐò·ñ
ÔÊÐíÔªËØÖØ¸´·ñ
Collection
·ñ
ÊÇ
List
ÊÇ
ÊÇ
Set
AbstractSet
·ñ
·ñ
HashSet
TreeSet
ÊÇ£¨Óöþ²æÊ÷Å ......

java´´½¨Xml±Ê¼Ç


ÓÃjava´´½¨XmlµÄ4´óÀࣺ
 
Element£º½ÚµãÀà
AttributeÊôÐÔÀà
Document£ºÖ¸µÄ¾ÍÊÇÎĵµÀà
XMLOutput£ºÊä³öÀà
´ËÀàÊÇÓÃjava½¨Á¢Ò»¸öxmlÎļþ
 
public class TestJdom {
    //´´½¨XML£¨Ä£ÐÍ£©dom
    public static void main(String[] args) {
     ......

javaÄÚ´æÒç³ö

ÄÚ´æÒç³öÓëÊý¾Ý¿âËø±íµÄÎÊÌ⣬¿ÉÒÔ˵ÊÇ¿ª·¢ÈËÔ±µÄجÃΣ¬Ò»°ãµÄ³ÌÐòÒì³££¬×ÜÊÇ¿ÉÒÔÖªµÀÔÚʲôʱºò»òÊÇÔÚʲô²Ù×÷²½ÖèÉϳöÏÖÁËÒì³££¬¶øÇÒ¸ù¾Ý¶ÑÕ»ÐÅÏ¢Ò²ºÜÈÝÒ×¶¨Î»µ½³ÌÐòÖÐÊÇij´¦³öÏÖÁËÎÊÌâ¡£ÄÚ´æÒç³öÓëËø±íÔò²»È»£¬Ò»°ãÏÖÏóÊDzÙ×÷Ò»°ãʱ¼äºóϵͳԽÀ´Ô½Âý£¬Ö±µ½ËÀ»ú£¬µ«²¢²»ÄÜÃ÷È·ÊÇÔÚʲô²Ù×÷ÉϳöÏֵ쬷¢ÉúµÄʱ¼äµãҲûÓйæ ......

JavaÖ®Servlet¿ª·¢

±¾ÎİüÀ¨:
A: servletÔ´ÂëʵÀý
B: servlet²¿Êð
C: ¿Í»§¶ËÔ¶³Ìµ÷ÓÃ
D: servlet¿ª·¢µ÷Óù¤¾ß
A: servletÔ´ÂëʵÀý
package com.viewlinecn.userlogin.www.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http ......

JavaÖг£ÓõļÓÃÜËã·¨Ó¦ÓÃMD5£¬SHA,RSA

JavaÖг£ÓõļÓÃÜËã·¨Ó¦ÓÃMD5£¬SHA,RSA
×÷Õß: , ¡¡³ö´¦:ÖйúITʵÑéÊÒ,¡¡ÔðÈα༭: Àî´ºÓí,¡¡
2007-11-15 14:45
¡¡¡¡¡¡1. MD5¼ÓÃÜ£¬³£ÓÃÓÚ¼ÓÃÜÓû§ÃûÃÜÂ룬µ±Óû§Ñé֤ʱ¡£} ¡¡¡¡}¡¡¡¡2. SHA¼ÓÃÜ£¬ÓëMD5ÏàËÆµÄÓ÷¨£¬Ö»ÊÇÁ½ÕßµÄËã·¨²»Í¬¡£} ¡¡¡¡}¡¡¡¡3. RSA¼ÓÃÜ£¬RAS¼ÓÃÜÔÊÐí½âÃÜ¡£³£ÓÃÓÚÎı¾ÄÚÈݵļÓÃÜ¡£
¡¡¡¡1. MD5¼ÓÃÜ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ