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

javaÖÐ×î³£Óõļ¯ºÏ Ïêϸ½²½â


/**ÎÒÕâÖ»½² ListArray ,ListedList,HashMap
//ListArray ËüÊÇÒ»¸öʵÏÖÁËList½Ó¿ÚµÄÀà ,List¼Ì³Ðcollection½Ó¿Ú
//µ÷ÓÃimport java.util.ArrayList°ü,(ÕâÀïÁ½ÕßÈÎÑ¡ÆäÒ») ÍêÕûµÄjava¼¯ºÏ´æ·ÅÔÚjava.util°üÖÐ
//Ìصã:
1>.ListÊÇÓÐÐòµÄ¼¯ºÏ
2>.List¿ÉÒÔÓÐÖظ´µÄÔªËØÖµ
3>.ʹÓÃË÷ÒýÀ´¾«È·µÄ·ÃÎÊÔªËØÖµ,
4>.ListÄܹ»¾«È·µÄ¿ØÖÆÿ¸öÔªËزåÈëµÄλÖÃ
//Óŵã
1>.ʵÏÖÁ˶¯Ì¬Êý×飬±éÀúÔªËغÍËæ»ú·ÃÎÊÔªËصÄЧÂʸߣ¨ÏÂÃæ¾ÙÀý±éÀúÔªËØ£©
Ò»£¬ListÓëListArray Óï·¨  ×¢Òâ±¾ÈËÊÇÓÃStringÀàÐ͵ÄÊý¾Ý ´ó¼Ò¿ÉÒÔ×Ô¶¨¶ÔÏó
  List list= new ListArray();
//Ìí¼ÓÒ»¸öÔªËØ
  String str="123";
  list.add(str); //ÆðʼλÖôÓ0¿ªÊ¼,·µ»Ø²¼¶ûÖµ
//·µ»Ø¼¯ºÏÖеÄÔªËظöÊý
   list.size(); //·µ»ØintÀàÐÍ
//¸ù¾ÝË÷ÒýÈ¡Öµ,·µ»ØObjecLÀàÐÍ
  String s=(String)list.get(0);//´«ÈëµÄÊÇintÀàÐÍË÷Òý£¬ÕâÀïÎÒÊÇÓÃString ÀàÐÍ ,ÐèҪת»»
// ÔÚÖ¸¶¨µÄË÷ÒýÌí¼ÓÖ¸¶¨µÄÔªËØ
  list.add(1,"123456");  //×¢Òâ²»ÄÜûÌí¼Ó1ÔªËØÇ°Ìí¼Ó2ÔªËØ,ÕâÑùÔÚÔËÐÐʱÒý·¢Òì³£
// ²é¿´ÔªËØÊÇ·ñ´æÔÚ
 list.contains(str); //·µ»Ø²¼¶ûÀàÐÍÊý¾Ý
 //ɾ³ýÔªËØ
 list.remove(str); //·µ»Ø²¼¶ûÀàÐÍÊý¾Ý
 
/****±éÀúListArray******/
  for(int i=0; i<list.size();i++){
        System.out.println(list.get(i));
  }
 
¶þ£¬ListÓëLinkedListÀà
 // Óï·¨£º
   LinkedList listed= ne LinkedList();
   String c ="123";
   String b ="123";
   String e ="123";
 //Ôö¼ÓÔªËØ
 1>Ôö¼ÓÍ·²¿ÔªËØ
   listed.addFirst(c);
 2>Ôö¼Óβ²¿ÔªËØ
  listed.addLast(b);
 //»ñÈ¡ÔªËØ
 1>»ñÈ¡µÚÒ»¸öÔªËØ
 String st=(String) listed.getFist();
  2>»ñȡβ²¿ÔªËØ
  String st1 =(String) listed.getLast();
 //ɾ³ýÔªËØ
 1>ɾ³ýµÚÒ»¸öÔªËØ
  listed.removeFisrst();
 2>ɾ³ýβ²¿ÔªËØ
  listed.removeLast();
 *******ListedListËüÒ²¾ßÓÐListArrayµÄ·½·¨******
  Ó¦ÕâÑù´´½¨
 List list= new ListedList(); //ÕâÑùÖ»ListArrayÖеķ½·¨
 Listed


Ïà¹ØÎĵµ£º

JAVA¶ÑÕ»µÄÇø±ð

 
1
. Õ»(stack)Óë¶Ñ(heap)¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£      
    
¡¡¡¡2
. Õ»µÄÓÅÊÆÊÇ£¬´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ÎÓÚÖ±½ÓλÓÚCPUÖеļĴæÆ÷¡£µ«È±µãÊÇ£¬´æÔÚÕ»ÖеÄÊý¾Ý´óСÓëÉú ......

JAVA±¨±íÁ½ÈÕÆÚ¼äÔ£¬ÖÜ£¬ÈÕ¼ÆËã

 //¼ÆËãÌìÊý
 public List day(String dates,String datee) throws ParseException{
  List dayls=new ArrayList();
  // ×Ö·û´®×ª»»³ÉÈÕÆÚ
  SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
  Date startDate = format.parse(dates);
 &nb ......

¶à´°¿ÚÒì²½ÊÛƱjava¾À´í

ÕâÊÇ·þÎñ´°¿ÚÀ࣬ģÄâËĸöÏß³ÌÒì²½ÔËÐÐ
public class TicketWindow {
 public static void main(String args[]) {
  Ticket ticket = new Ticket();
  Thread w1 = new Thread(ticket, "1ºÅÊÛƱ´°¿Ú");
  Thread w2 = new Thread(ticket, "2ºÅÊÛƱ´°¿Ú");
  Thread w3 ......

JAVAÏîÄ¿´úÂë±àд¹æ·¶


 
´úÂë±àд¹æ·¶Ä¿µÄ£ºÄܹ»ÔÚ±àÂë¹ý³ÌÖÐʵÏֹ淶»¯£¬ÎªÒÔºóµÄ³ÌÐò¿ª·¢ÖÐÑø³ÉÁ¼ºÃµÄÐÐΪϰ¹ß¡£
´úÂë±àд¹æ·¶Ê¹Ó÷¶Î§£ºJ2EEÏîÄ¿¿ª·¢¡£
°üÃüÃû¹æ·¶£º
Ä¿µÄ£º°üµÄÃüÃû¹æ·¶Ó¦µ±ÌåÏÖ³öÏîÄ¿×ÊÔ´Á¼ºÃµÄ»®·Ö
servletÀàËùÔÚ°üÃüÃû¹æ·¶£º¹«Ë¾Ãû³Æ.¿ª·¢×éÃû³Æ.ÏîÄ¿Ãû³Æ.web.servlet
ÀýÈ磺net.linkcn.web.servlet
×Ô¶¨Òå± ......

ÔÚÉÐѧÌÃѧÍêjavaÈÃÎÒÇáËɸ㶨¹¤×÷

ÔÚÉÐѧÌÃѧÍêjavaÈÃÎÒÇáËɸ㶨¹¤×÷
¡¾Ñ§Ô±¹ÊÊ¡¿À´×ÔÉÐѧÌÃÕæÈËÕæÊ                                       &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ