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

¹ØÓÚJAVAµÄtry catch finallyµÄÒ»¸öÎÊÌâ

class TestTryFinallyC {
public static void main(String[] args) {
System.out.println(testt());
}

public static int testt() {
int x = 99;
try {
return x;
}finally {
x = 8;
}
}
}

ijÄêijÔµÄijһÌ죬ȺÀïһλÈÊÐÖ·¢ÁËÉϱߵĴúÂë¡£
½á¹ûÊdzöÈËÒâÁϵġ£
ÏÂÃæÎÒ·¢Ò»ÏÂÕâ¶Î´úÂëµÄJVMÍêÕûÖ¸Áî
Compiled from "TestTryFinallyC.java"
class TestTryFinallyC extends java.lang.Object
SourceFile: "TestTryFinallyC.java"
minor version: 0
major version: 50
Constant pool:
const #1 = class #2; // TestTryFinallyC
const #2 = Asciz TestTryFinallyC;
const #3 = class #4; // java/lang/Object
const #4 = Asciz java/lang/Object;
const #5 = Asciz <init>;
const #6 = Asciz ()V;
const #7 = Asciz Code;
const #8 = Method #3.#9; // java/lang/Object."<init>":()V
const #9 = NameAndType #5:#6;// "<init>":()V
const #10 = Asciz LineNumberTable;
const #11 = Asciz LocalVariableTable;
const #12 = Asciz this;
const #13 = Asciz LTestTryFinallyC;;
const #14 = Asciz main;
const #15 = Asciz ([Ljava/lang/String;)V;
const #16 = Field #17.#19; // java/lang/System.out:Ljava/io/PrintStream;
const #17 = class #18; // java/lang/System
const #18 = Asciz java/lang/System;
const #19 = NameAndType #20:#21;// out:Ljava/io/PrintStream;
const #20 = Asciz out;
const #21 = Asciz Ljava/io/PrintStream;;
const #22 = Method #1.#23; // TestTryFinallyC.testt:()I
const #23 = NameAndType #24:#25;// testt:()I
const #24 = Asciz testt;
const #25 = Asciz ()I;
const #26 = Method #27.#29; // java/io/PrintStream.println:(I)V
const #27 = class #28; // java/io/PrintStream
const #28 = Asciz java/io/PrintStream;
const #29 = NameAndType #30:#31;// println:(I)V
const #30 = Asciz println;
const #31 = Asciz (I)V;
const #32 = Asciz args;
const #33 = Asciz [Ljav


Ïà¹ØÎĵµ£º

ÈÏʶjavaÖеÄÔËÐÐʱÒì³£

JavaÖÐÒì³£Ò»°ã·ÖΪ3À࣬ϱ߽éÉÜÏ£¬½ö½öÊǸöÈËÀí½â¡£
µÚÒ»ÖÖÊDZàÒëÆÚÒì³££¬»òÕß½Ðcheck Exception¡£
±àÒëÆÚÒì³£µÄÌص㣺
1.ϵͳҪÇó±ØÐëÔÚ³ÌÐòÀï×ö³ö´¦Àí£¬·ñÔò±¨±àÒë´íÎ󣬱àÒëÎÞ·¨Í¨¹ý£¬Ò²¾ÍÊÇ˵ϵͳǿÖÆÒªÇó´¦Àí£¬¶ÔÓÚ´¦Àí·½Ê½£¬²»ÍâºõÖ±½Ócatch´¦ÀíºÍÅ׳öµ½Íâ²ã£¬µ«ÊÇ×îÖÕ»¹ÊÇÒª´¦ÀíµÄ¡£
2.Óû§×Ô¶¨ÒåÒ»¸ö±àÒëÆÚÒ ......

java(Web)ÖÐÏà¶Ô·¾¶£¬¾ø¶Ô·¾¶ÎÊÌâ×ܽá

1.»ù±¾¸ÅÄîµÄÀí½â
¡¡¡¡¾ø¶Ô·¾¶£º¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺
C:\xyz\test.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸ö
URL¾ø¶Ô·¾¶¡£
¡¡¡¡Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄÏà¶Ô·¾¶£¨HTMLÖеÄÏà¶ÔĿ¼£©£¬ÀýÈ磺ÔÚ ......

Java clone»úÖÆ

1¡¢ Java¶ÔÏó¸³Öµ
Java´úÂë
Employee e1=
new
 Employee(
"Àî"
); 
//EmployeeÊÇÒ»¸ö×Ô¶¨ÒåÀà 
  
Employee e2=e1; //¸³Öµ¶ÔÏó 
  
e2.setName("Íõ"
);
//¸Ä±ä¶ÔÏóe2µÄÃû×Ö 
  
System.out.println(e1.getName ......

JavaÈýÖÖ·½Ê½½âÎöxml


JavaÀï±ß½âÎöxmlÒ»°ãÓÐÈýÖÖ³£Óõļ¼Êõ£º
1¡¢ Document Object Model (DOM)£¬W3CÀï±ßÒ»ÖÖ³ÉÊìµÄ±ê×¼¡£Ä¿Ç°¹ã·ºÊ¹ÓõĽâÎö¹¤¾ß£ºJDOM DOM4J
2¡¢ Simple API for XML (SAX)£¬µÚÒ»ÖÖ±»¹ã·º½ÓÊܵÄXMLµÄAPI£¬³ÉΪÊÂʵÉϵıê×¼¡£
3¡¢ Streaming API for XML (StAX)£¬ÔÚJSR-173ÖÐÌáµ½µÄÒ»ÖÖºÜÓÐǰ;µÄÐÂÐͽâÎöÄ ......

Java ʱ¼ä²Ù×÷

1.¼ÆËãijһÔ·ݵÄ×î´óÌìÊý
Calendar time=Calendar.getInstance();
time.clear();
time.set(Calendar.YEAR,year); //year Ϊ int
time.set(Calendar.MONTH,i-1);//×¢Òâ,Calendar¶ÔÏóĬÈÏÒ»ÔÂΪ0          
int day=time.getActualMaximum(Calendar.DAY_OF_MONTH) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ