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

javaÒì³£´¦Àí£¨1£©

Äã¾õµÃ×Ô¼ºÊÇÒ»¸öJavaר¼ÒÂð£¿ÊÇ·ñ¿Ï¶¨×Ô¼ºÒѾ­È«ÃæÕÆÎÕÁËJavaµÄÒì³£´¦Àí»úÖÆ£¿ÔÚÏÂÃæÕâ¶Î´úÂëÖУ¬ÄãÄܹ»Ñ¸ËÙÕÒ³öÒì³£´¦ÀíµÄÁù¸öÎÊÌâÂð£¿
OutputStreamWriter out = ...
java.sql.Connection conn = ...
try { // ¢É
Statement stat = conn.createStatement();
ResultSet rs = stat.executeQuery(
"select uid, name from user");
while (rs.next())
{
out.println("ID£º" + rs.getString("uid") // ¢Ê
"£¬ÐÕÃû£º" + rs.getString("name"));
}
conn.close(); // ¢Ç
out.close();
}
catch(Exception ex) // ¢Æ
{
ex.printStackTrace(); //¢Å£¬¢È

¡¡¡¡×÷Ϊһ¸öJava³ÌÐòÔ±£¬ÄãÖÁÉÙÓ¦¸ÃÄܹ»ÕÒ³öÁ½¸öÎÊÌâ¡£µ«ÊÇ£¬Èç¹ûÄã²»ÄÜÕÒ³öÈ«²¿Áù¸öÎÊÌ⣬Çë¼ÌÐøÔĶÁ±¾ÎÄ¡£
¡¡¡¡±¾ÎÄÌÖÂ۵IJ»ÊÇJavaÒì³£´¦ÀíµÄÒ»°ãÐÔÔ­Ôò£¬ÒòΪÕâЩԭÔòÒѾ­±»´ó¶àÊýÈËÊìÖª¡£ÎÒÃÇÒª×öµÄÊÇ·ÖÎö¸÷ÖֿɳÆΪ“·´Àý”£¨anti-pattern£©µÄÎ¥±³ÓÅÐã±àÂë¹æ·¶µÄ³£¼û»µÏ°¹ß£¬°ïÖú¶ÁÕßÊìϤÕâЩµäÐ͵ķ´ÃæÀý×Ó£¬´Ó¶øÄܹ»ÔÚʵ¼Ê¹¤×÷ÖÐÃôÈñµØ²ì¾õºÍ±ÜÃâÕâЩÎÊÌâ¡£
¡¡¡¡·´ÀýÖ®Ò»£º¶ªÆúÒì³£
¡¡¡¡´úÂ룺15ÐÐ-18ÐС£
¡¡¡¡Õâ¶Î´úÂ벶»ñÁËÒ쳣ȴ²»×÷Èκδ¦Àí£¬¿ÉÒÔËãµÃÉÏJava±à³ÌÖеÄɱÊÖ¡£´ÓÎÊÌâ³öÏÖµÄƵ·±³Ì¶ÈºÍ»öº¦³Ì¶ÈÀ´¿´£¬ËüÒ²Ðí¿ÉÒÔºÍC/C++³ÌÐòµÄÒ»¸ö¶ñÃûÔ¶²¥µÄÎÊÌâÏàÌá²¢ÂÛ——²»¼ì²é»º³åÇøÊÇ·ñÒÑÂú¡£Èç¹ûÄã¿´µ½ÁËÕâÖÖ¶ªÆú£¨¶ø²»ÊÇÅ׳ö£©Òì³£µÄÇé¿ö£¬¿ÉÒÔ°Ù·ÖÖ®¾ÅÊ®¾ÅµØ¿Ï¶¨´úÂë´æÔÚÎÊÌ⣨ÔÚ¼«ÉÙÊýÇé¿öÏ£¬Õâ¶Î´úÂëÓдæÔÚµÄÀíÓÉ£¬µ«×îºÃ¼ÓÉÏÍêÕûµÄ×¢ÊÍ£¬ÒÔÃâÒýÆð±ðÈËÎó½â£©¡£
¡¡¡¡Õâ¶Î´úÂëµÄ´íÎóÔÚÓÚ£¬Òì³££¨¼¸ºõ£©×ÜÊÇÒâζ×ÅijЩÊÂÇé²»¶Ô¾¢ÁË£¬»òÕß˵ÖÁÉÙ·¢ÉúÁËijЩ²»Ñ°³£µÄÊÂÇ飬ÎÒÃDz»Ó¦¸Ã¶Ô³ÌÐò·¢³öµÄÇó¾ÈÐźű£³Ö³ÁĬºÍÎÞ¶¯ÓÚÖÔ¡£µ÷ÓÃÒ»ÏÂprintStackTraceËã²»ÉÏ“´¦ÀíÒì³£”¡£²»´í£¬µ÷ÓÃprintStackTrace¶Ôµ÷ÊÔ³ÌÐòÓаïÖú£¬µ«³ÌÐòµ÷ÊԽ׶νáÊøÖ®ºó£¬printStackTrace¾Í²»Ó¦ÔÙÔÚÒì³£´¦ÀíÄ£¿éÖе£¸ºÖ÷ÒªÔðÈÎÁË¡£
¡¡¡¡¶ªÆúÒì³£µÄÇéÐηdz£Æձ顣´ò¿ªJDKµÄThreadDeathÀàµÄÎĵµ£¬¿ÉÒÔ¿´µ½ÏÂÃæÕâ¶Î˵Ã÷£º“ÌرðµØ£¬ËäÈ»³öÏÖThreadDeathÊÇÒ»ÖÖ‘Õý³£µÄÇéÐÎ’£¬µ«ThreadDeathÀàÊÇError¶ø²»ÊÇExceptionµÄ×ÓÀ࣬ÒòΪÐí¶àÓ¦Óà »á²¶»ñËùÓеÄExceptionÈ»ºó¶ªÆúËü²»ÔÙÀí²Ç¡£”Õâ¶Î»°µÄÒâ˼ÊÇ£¬ËäÈ»ThreadDeath´ú±íµÄÊÇÒ»ÖÖÆÕͨµÄÎÊÌ⣬µ«¼øÓÚÐí¶àÓ¦ÓûáÊÔͼ²¶»ñËùÓÐÒì³£È


Ïà¹ØÎĵµ£º

javaÖÐÈçºÎʹÓÃamcharts


×î½ü¹«Ë¾Åöµ½ÐèÒªÓÃͼ±íµÄÐÎʽÏÔʾһЩÊý¾Ý£¬ÎҾͿªÊ¼µ½ÍøÉϲéѯ£¬²éµ½ÁËjfreechartºÍamcharts,ÕâÁ½ÕßÎÒ¶¼ÊµÏÖ¹ýÁË£¬jfreechart×îºóÉú³ÉͼƬ£¬µ«ÊÇͼƬЧ¹û²»ÊÇÎÒÏëÒªµÄ£¬È»ºóÓÖÑо¿amcharts ËüµÄЧ¹ûȷʵºÜºÃ£¬¶øÇÒ¹Ù·½ÍøÕ¾ÉÏ»¹ÓкÃЩÀý×ӿɹ©ÏÂÔØ£¬ÍøÖ·ÊÇ:www.amcharts.com
£¨ÏëÒªÍê³ÉÒ»¸öamchartsͼÐÎÐèÒªswfobjects. ......

JavaÓëActionScriptµÄSocket(1)

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package cn.vicky.socket;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.Vector;
/**
*
* @author Vicky
* ¹ã²¥Àà
*/
public class BMana ......

JAVA»­³öwavÒôƵ²¨ÐÎͼ


×ֺţº´ó ÖРС
import java.awt.Graphics;
import java.io.File;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
public class M ......

JavaÖÐÈçºÎÖ´ÐÐJavaScript

   ÎÒÃÇÔÚ½øÐÐWEB¿ª·¢µÄʱºò£¬¾­³£ÐèÒªÔÚ¿Í»§¶Ë±àдһЩjsº¯Êý£¬ÕâЩº¯ÊýÈç¹ûÐèÒªÔÚ·þÎñ¶ËÖ´ÐеĻ°£¬Èç¹ûÖØбàдµÄ»°£¬¾ÍÏÔµÃÊ®·ÖÈßÓ࣬Òò´ËÎÒÃÇ¿ÉÒÔ³¢ÊÔÔÚ·þÎñ¶Ë£¬Ö±½ÓÖ´ÐÐjs£¬ÕâÑùµÄ»°¾Í¿ÉÒÔ±ÜÃâÖظ´ÀͶ¯£¬Í¬Ê±£¬µ÷ÓÃjsÒ²Óиöº¯Êý£¬¾ÍÊǷdz£·½±ãµ÷ÊÔ¡£
×î¹Ø¼üµÄÒ»²½¾ÍÊǵ÷ÓÃ
conext.evaluateString(scope,&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ