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

JAVA Object[]Êý×éת»¯ÎÊÌâ

×î½üÓöµ½ÁËÒ»¸öÎÊÌ⣬¾ÍÊÇÔÚÓõ½List.toArray ·½·¨Ê±£¬·µ»ØObject[]Êý×飬ֱ½Ó°ÑËüǿת³ÉÆäËûÀàÐ͵Ļᱨ´í£º
   code:  ArrayList list=getList();
             String[] s=(String[])list.toArray();
   exception:java.lang.classcastException
 ÕýȷʹÓ÷½·¨Îª£º
             ArrayList list=getList();
             String[] s=new String[list.size];
             s=list.toArray(s);
 Ïêϸ·ÖÎöÇë¼û£ºhttp://blog.sina.com.cn/s/blog_40585f8d0100058e.html
          


Ïà¹ØÎĵµ£º

javaÅÅÐò¼¯½õ


package sort;   
  
import java.util.Random;   
  
/**  
 * ÅÅÐò²âÊÔÀà  
 *   
 * ÅÅÐòËã·¨µÄ·ÖÀàÈçÏ£º 1.²åÈëÅÅÐò£¨Ö±½Ó²åÈëÅÅÐò¡¢ÕÛ°ë²åÈëÅÅÐò¡¢Ï£¶ûÅÅÐò£©£» 2.½»»»ÅÅÐò£¨Ã°ÅÝÅÝÅÅÐò¡¢¿ìËÙÅÅ ......

ÈçºÎÓÃJAVA ¶ÔÏó£¿

ÈçºÎÓÃJAVA ¶ÔÏó£¿
д¼òµ¥Ï¸øÎÒ¿´Ï ллÁË
´´½¨Àà Ãû×Ö =new ÉèString ¼¸¸ö¶¼¿ÉÒÔ¡£ ÔÚÓø´ÖÆ Êä³ö
ÔÚÏÂÃæ¼ÌÐø´´½¨Àà ºóÃæ×îºÃ±ê×¢ÉÏ//ÕâÑù¿´ÆðÀ´¼òµ¥ÏÂллÁË
Çó½â¾ö ÀàºÍ¶ÔÏóûѧÃ÷°×ÀÏʦ½²µÄÎÒºýÍ¿ ÃÔºý×ö²»³öÀ´¡£ ......

ubuntuÏÂjava°²×°

´ò¿ªÖնˣ¬Ö´ÐÐÒÔÏÂÃüÁ»òʹÓÃAdept/ÐÂÁ¢µÃÈí¼þ¹ÜÀíÆ÷£¬ÔÚÆäÖÐËÑË÷"sun-java6-jdk"²¢±ê¼Ç°²×°¡£
sudo apt-get install sun-java6-jdk
Ìáʾ£º°²×°¹ý³ÌÖÐÐèÒªÄã»Ø´ðÊÇ·ñͬÒâʹÓÃЭÒ飨ÖÕ¶ËÖкìÀ¶É«µÄÌáʾ½çÃ棩£¬´Ëʱ°´tab¼üÖÁOK£¬ÔÙ°´»Ø³µ¼´¿ÉÕý³£°²×°¡£
    * ÉèÖõ±Ç°Ä¬ÈϵÄjava½âÊÍÆ÷ºÍ±àÒ ......

java ¼¯³É¿ª·¢»·¾³¶Ô±È

Eclipse ¾ßÌåµÄ¾Í²»ËµÁË£¬¶¼ÊìϤÁËO(¡É_¡É)O~£¬ ×î´óµÄÌص㣺ËüÄܽÓÊÜÓÉjava¿ª·¢Õß×Ô¼º±àдµÄ¿ª·ÅÔ´´úÂëµÄ²å¼þ¡£ NetBeans NetBeansÊÇsunµÄΨһһ¿îÍêÈ«¿ªÔ´µÄ²úÆ·£¬ÔÚ¹¦ÄÜÉÏÓëEclipseÀàËÆ£¬µ«Ò²ÓÐһЩÇø±ð¡£È磺Ëü¼¯³ÉÁË×îÁ÷ÐеÄAjax£¬EclipseÐèÒª°²×°µÚÈý·½²å¼þ£¬Eclipse¹ÄÀøʹÓÃswt×÷ΪjavaGUI¿â ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ