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

JAVAѧϰ±Ê¼Ç£¨Ò»£© Òì³£´¦Àí

Òì³£ÊÇÖ¸³ÌÐòÔËÐÐÆÚ¼ä³öÏÖµÄÎÊÌâ¡£ÔÚд³ÌÐòʱ£¬È·Êµ¿ÉÒÔд´úÂë²âÊÔ³ÌÐòÊÇ·ñÕýÈ·Ö´ÐУ¬Èç¹ûûÓÐÖ´ÐУ¬ÔòÖ´ÐдíÎó´¦Àí¡£¾¡¹ÜÕâÖÖÐÎʽµÄ´íÎó´¦ÀíÄܹ»Æðµ½×÷Ó㬵«³ÌÐòÂß¼­Óë´íÎó´¦ÀíÒ»Æð»ìÓ㬻áʹµÃ³ÌÐòÄÑÒÔÔĶÁ‘Ð޸ġ£Èç¹ûDZÔÚµÄÎÊÌ⼫ÉÙ·¢Éú£¬Ôò»ìÓóÌÐòºÍ´íÎó´¦ÀíÂß¼­½²½µµÍ³ÌÐòµÄÐÔÄÜ¡£Òì³£´¦Àíʹ³ÌÐòÔ±Äܹ»´Ó³ÌÐòÖ´ÐеÄÖ÷ÏßÖÐɾ³ý´íÎó´¦Àí´úÂ롣ûÓÐÒì³£·¢Éúʱ£¬Òì³£´¦Àí´úÂë½ö»áÔö¼Ó¼«ÉÙ»ò²»Ôö¼Ó¿ªÏú¡£Òò´Ë£¬ÊµÏÖÒì³£´¦ÀíµÄ³ÌÐòÔÚÖ´ÐÐЧÂÊÉÏÒª¸ßÓÚ´íÎó´¦Àí´úÂëÓë³ÌÐòÂß¼­»ìÓõijÌÐò¡£
try¿é°üº¬¿ÉÄܲúÉúÒì³£µÄÓï¾äÒÔ¼°Òì³£·¢Éúʱ²»Ó¦Ö´ÐеÄÓï¾ä¡£try¿éºó±ØÐëÖÁÉÙ½ô¸úÒ»Ìõcatch×Ӿ䣨Ҳ³ÆΪÒì³£´¦Àíº¯Êý£©»òÒ»Ìõfinally×Ӿ䡣ÿÌõcatch×Ó¾äÔÚÔ²À¨ºÅÖÐÖ¸¶¨Ò»¸öÒì³£²ÎÊý£¬ÓÃÓÚ±êʶ¸Ã´¦Àíº¯ÊýÄܹ»´¦ÀíµÄÒì³£ÀàÐÍ¡£catch×Ó¾äͨ¹ýÒì³£²ÎÊýµÄÃû³ÆÓëÒì³£²¶»ñ¶ÔÏó½øÐн»»¥¡£×îºóÒ»¸öcatchÖ®ºóÊÇÒ»¸ö¿ÉÑ¡finally×Ӿ䣬ÎÞÂÛÒì³£ÊÇ·ñ·¢Éú£¬¶¼»áÖ´ÐиÃ×Ó¾äËùÌṩµÄ´úÂë¡£finally×Ó¾äÊÇÒ»¸öÀíÏëµÄÊÍ·Å×ÊÔ´£¬´Ó¶ø·ÀÖ¹“×ÊԴй©”µÄµØ·½¡£ÔÚ·½·¨ÉùÃ÷ÖУ¬throws×Ó¾äÖ¸¶¨¸Ã·½·¨ËùÅ׳öµÄÒì³£¡£¸Ã×Ó¾äλÓÚ·½·¨²ÎÊýÁбíÖ®ºó£¬¾ßÌå·½·¨Ö®Ç°¡£Èç
public int º¯ÊýÃû£¨£©
throws Òì³£
{
}
throws×Ó¾ä°üº¬Ò»¸öÓɶººÅ·Ö¿ªµÄÒì³£ÁÐ±í£¬Èç¹ûÔÚ·½·¨Ö´ÐÐÆÚ¼ä³öÏÖÎÊÌ⣬Ôò¸Ã·½·¨½«Å׳öÁбíÖеÄÒì³£¡£


Ïà¹ØÎĵµ£º

java Óʼþ·þÎñÆ÷Ö®james°²×°ÅäÖÃ


James Óʼþ·þÎñÆ÷µÄ°²×°ºÍÅäÖÃ
»·¾³:
Óʼþ·þÎñÆ÷:
²Ù×÷ϵͳ:REDHAT LINUX AS 4
IP:192.168.1.108
×ÓÍøÑÚÂë:255.255.0
Íø¹Ø:192.168.1.1
DNS:192.168.1.2
¿Í»§¶Ë:
²Ù×÷ϵͳ:windows 2003
IP :192.168.1.2
×ÓÍøÑÚÂë:255.255.255.0
Íø¹Ø:192.168.1.1
DNS:192.168.1.2
¼òµ¥½éÉÜÒ»ÏÂÓʼþ·þÎñÆ÷µÄÅäÖû·¾³
ÒѾ­° ......

Java ¼¸ÖÖÅÅÐò·¨

ÕâÀïÖ÷Òª¶Ô8ÖÖÅÅÐòËã·¨×ö¸ö×ܽᣬ·Ö±ðÊDzåÈëÅÅÐò£¬Ñ¡ÔñÅÅÐò£¬Ã°ÅÝÅÅÐò£¬Ï£¶ûÅÅÐò£¬¹é²¢ÅÅÐò£¬¶ÑÅÅÐò£¬¿ìËÙÅÅÐòÒÔ¼°»ùÊýÅÅÐò¡£
1¡¢ ²åÈëÅÅÐò
±È½ÏºÍ½»»»µÄʱ¼ä¸´ÔÓ¶ÈΪO(n^2)£¬Ëã·¨×ÔÊÊÓ¦£¬¶ÔÓÚÊý¾ÝÒÑ»ù±¾ÓÐÐòµÄÇé¿ö£¬Ê±¼ä¸´ÔÓ¶ÈΪO(n)£¬Ëã·¨Îȶ¨£¬¿ªÏúºÜµÍ£¬ÊʺÏÓÚÊý¾ÝÒÑ»ù±¾ÓÐÐò»òÕßÊý¾ÝÁ¿Ð¡µÄÇé¿ö¡£
public void ins ......

JavaÄÚ´æÒç³ö

´ÓÎïÀíÉϽ²£¬¶ÑÕ»¾ÍÊÇÒ»¶ÎÁ¬Ðø·ÖÅäµÄÄÚ´æ¿Õ¼ä¡£ÔÚÒ»¸ö³ÌÐòÖУ¬»áÉùÃ÷¸÷ÖÖ±äÁ¿¡£¾²Ì¬È«¾Ö±äÁ¿ÊÇλÓÚÊý¾Ý¶Î²¢ÇÒÔÚ³ÌÐò¿ªÊ¼µÄʱºò¾Í±»¼ÓÔØ¡£¶ø³ÌÐòµÄ¶¯Ì¬µÄ¾Ö²¿±äÁ¿Ôò·ÖÅäÔÚ¶ÑÕ»ÀïÃæ¡£
JVM¹ÜÀíÁ½ÖÖÀàÐ͵ÄÄڴ棬¶ÑºÍ·Ç¶Ñ¡£¶ÑÊǸø¿ª·¢ÈËÔ±ÓõÄÉÏÃæ˵µÄ¾ÍÊÇ£¬ÊÇÔÚJVMÆô¶¯Ê±´´½¨£»·Ç¶ÑÊÇÁô¸øJVM×Ô¼ºÓõģ¬ÓÃÀ´´æ·ÅÀàµÄÐÅÏ¢µÄ¡£Ëüº ......

JavaÈ¡µÃ´úÂëËùÔÚÐкŵķ½·¨

ÓÃCµÄÈËÒ»¶¨ÖªµÀ__FILE__ºÍ__LINE__,µ«ÊÇJavaÖÐ ²¢Ã»ÓÐÕâÑùµÄ¶¨Ò壬ÓÐʱºòµ÷ÊÔ¶àÏ߳̾ͺܲ»·½±ã£¬Ã»°ì·¨£¬×Ô¼º¶¯ÊÖ£¬·áÒÂ×ãʳ~ÓÃÏÂÃæµÄº¯ÊýÈ¡µÃµ±Ç°Ðкš£
º¯Êý£º
/**
*µÃµ½ExceptionËùÔÚ´úÂëµÄÐÐÊý
*Èç¹ûûÓÐÐÐÐÅÏ¢,·µ»Ø-1
*/
public static int getLineNumber(Exception e){
StackTraceElement[] trace =e.getStac ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ