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

try...catch...finally java String µÄÓ÷¨

javaÖÐÒì³£µÄÁ½ÖÖ´¦Àí£º
1.try...catch....finally ´æÔÚÓ뵱ǰµÄÒì³£´¦ÀíÀ࣬±íʾµ±Ç°ÓÉ×Ô¼ºµÄ·½·¨À´´¦Àí
2.Throw ½«µ±Ç°Òì³£Å׳ö £¬½»ÓÉÉϼ¶À´´¦Àí¡£
 try...catch....finallyµÄ´¦ÀíÁ÷³Ì£º
   ½«³öÏÖÒì³£µÄÓï¾ä·ÅÔÚtryÖУ¬Ò»¶Î´ËÓï¾ä³ö´í£¬³ÌÐò»áÔÝÍ£Ö´ÐУ¬Òì³£´¦Àí»úÖƾÍÈ¥½Ó¹Ü³ÌÐò£¬
   ½Óןù¾Ý³öÏÖµÄÒ쳣ȥƥÅäÏàÓ¦µÄcatch¿é£¬½øÐÐÏàÓ¦µÄ´¦Àí£¬´¦ÀíÍêºó¼ÌÐø´¦Àítry...catch....finally
   ÒÔÍâµÄÓï¾ä
   Ò»°ãµÄ try...catch....finally ¸ñʽÊÇÒ»¸ötry¿é£¬¶à¸öcatch¿é£¬×îºóÒ»¸öfinally¿ÉÓÐÒ²¿ÉûÓÐ
  catch¿éÒª×ñ´Ó×ÓÔÚÇ°¸¸ÔÚºó
throw½«Òì³£Å׳ö½»¸øÉϼ¶µ÷Ó÷½·¨£¬Éϼ¶µ÷Ó÷½·¨¿ÉÒÔ×Ô¼º´¦ÀíÒ²¿ÉÒÔ¼ÌÐøÅ׳ö
finallyÓï¾ä¿é¾ø¶Ô»áÖ´ÐУ¬²»¹ÜÓÐûÓÐÒì³£µÄ²úÉú
Òì³£·ÖÀࣺ
     ÔËÐÐʱÒì³££¨runtimeExcption£©£ºÔËÐÐʱ±¨´í£¬ÔËÐÐʱ²Å»á±¨´íµÄÒì³£  £¨ÊýѧÒì³££©È磺³ý0
     ±àÒëʱÒì³££¨IoException£©£º±àÒëʱ±¨´í£¬ÐèÒª³ÌÐòÏÔʾµÄ´¦Àí£¨try¡£¡£Catch£©
StringµÄÓ÷¨£º
StringÊÇÒ»¸öÒýÓÃÀàÐ͵Ä
class Example5_1
{
public static void main(String args[])
{
String s1,s2;
s1=new String("we are students");
s2=new String("we are students");
System.out.println(s1.equals(s2)); //Êä³ö½á¹ûÊÇ£ºtrue¡£
System.out.println(s1==s2); //Êä³ö½á¹ûÊÇ£ºfalse
String s3,s4;
s3="how are you";
s4="how are you";
System.out.println(s3.equals(s4)); //Êä³ö½á¹ûÊÇ£ºtrue¡£
System.out.println(s3==s4); //Êä³ö½á¹ûÊÇ£ºtrue¡£
}
}
Õâ¸ö³ÌÐò¾Í½«ÁËStringÖеÄequals£¨£©·½·¨ºÍ==µÄ²»Í¬µã
equals£¨£©·½·¨±È½ÏµÄÊÇÁ½¸ö¶ÔÏóµÄÄÚÈÝ
==±È½ÏµÄÊÇÁ½¸ö¶ÔÏóµÄµØÖ·
 
 
String ÀàÊÇÒ»¸öfinalÀࣨ×îÖÕÀࣩһµ©×Ö·û´®È·¶¨£¬ÄÇôËüµÄÖµ²»Ôٸı䣬Èç¹ûÁ¬½Ó»òÕßͨ¹ý·½·¨£¬¼Ó³¤×Ö·û¡£½«»á²úÉúеĴ®
S= “hello”ºÍs= new String£¨“hello”£©£ºS= “hello”£¬Ö±½ÓÖ¸Ïò“hello”µÄµØÖ· s=new String£¨“hello”£©£¬Ö±
½ÓÖ¸ÏòµÄString¶ÔÏó ¶ø²»ÊÇ Ö¸Ïò“hello”µØÖ·
     String³£Ó÷½·¨£ºÇó×Ö·û´®³¤¶È£¨ÊÇ°´×Ö·û¸öÊýÀ´Ë㣩¡£ . length£¨£©×¢ÒâÒ


Ïà¹ØÎĵµ£º

javaÉú²úÕßÏû·ÑÕß

ÌâÄ¿£ºÇëÓöàÏß³ÌʵÏÖÒ»¸öÉú²úÕßÀàºÍÒ»¸öÏû·ÑÕßÀ࣬Éú²úÕßËæ»úÉú³É20¸ö×Ö·û£¬Ïû·ÑÕß½«×Ö·û´òÓ¡µ½¿ØÖÆ̨¡£
class SyncStack{ //ͬ²½¶ÑÕ»Àà
¡¡¡¡¡¡private int index = 0; //¶ÑÕ»Ö¸Õë³õʼֵΪ0
¡¡¡¡¡¡private char []buffer = new char[6]; //¶ÑÕ»ÓÐ6¸ö×Ö·ûµÄ¿Õ¼ä
¡¡¡¡¡¡public synchronized void push(char c){ //¼ÓÉ ......

javaÓëtomcat»·¾³±äÁ¿ÉèÖÃ

 ¾­³£¿´µ½Ðí¶àÈËÎÊÈçºÎÅäÖÃJDKºÍJSP£¬ÏÖÔÚÎÒ°Ñ·½·¨×ܽáÏ£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
µÚÒ»²½£ºÏÂÔØjdkºÍtomcat
µÚ¶þ²½£º°²×°ºÍÅäÖÃÄãµÄjdkºÍtomcat£ºÖ´ÐÐjdkºÍtomcatµÄ°²×°³ÌÐò£¬È»ºóÉèÖð´ÕÕ·¾¶½øÐа²×°¼´¿É¡£
1.°²×°j2sdkÒÔºó£¬ÐèÒªÅäÖÃһϻ·¾³±äÁ¿£¬ÔÚÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿->ϵͳ±äÁ¿ÖÐÌí¼Ó ......

ÀûÓÃJAVA¶ÁÈ¡EXCELÎļþ


1 ´ÓExcelÎļþ¶ÁÈ¡Êý¾Ý±í
Java Excel API¼È¿ÉÒÔ´Ó±¾µØÎļþϵͳµÄÒ»¸öÎļþ(.xls)£¬Ò²¿ÉÒÔ´ÓÊäÈëÁ÷ÖжÁÈ¡ExcelÊý¾Ý±í¡£¶ÁÈ¡ExcelÊý¾Ý±íµÄµÚÒ»²½ÊÇ´´½¨Workbook(ÊõÓ¹¤×÷±¡)£¬ÏÂÃæµÄ´úÂëƬ¶Î¾ÙÀý˵Ã÷ÁËÓ¦¸ÃÈçºÎ²Ù×÷£º
import java.io.*;
import jxl.*;
try
{
//¹¹½¨Workbook¶ÔÏó, Ö»¶ÁWorkbook¶ÔÏó
  &nb ......

Myeclipse 8 keygen java source

public class MyEclipseGen {
private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up ......

ÿ¸öJava³õѧÕ߶¼Ó¦¸Ã¸ã¶®µÄÁù¸öÎÊÌâ

¶ÔÓÚÕâ¸öϵÁÐÀïµÄÎÊÌ⣬ÿ¸öѧJavaµÄÈ˶¼Ó¦¸Ã¸ã¶®¡£µ±È»£¬Èç¹ûÖ»ÊÇѧJavaÍæÍæ¾ÍÎÞËùνÁË¡£Èç¹ûÄãÈÏΪ×Ô¼ºÒѾ­³¬Ô½³õѧÕßÁË£¬È´²»ºÜ¶®ÕâЩÎÊÌ⣬Ç뽫Äã×Ô¼ºÖعé³õѧÕßÐÐÁС£ÄÚÈݾùÀ´×ÔÓÚCSDNµÄ¾­µäÀÏÌù¡£
¡¡¡¡ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
¡¡¡¡Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄÊÂÇ飬µ«ÊÇ£¬ÎÒÃǵ½µ×ÉùÃ÷ÁËʲô£¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ