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

JavaµÄContainerʾÀý³ÌÐò

package com.tiantian;
import java.util.*;
public class JAVAContainer {
public static void main(String[] args) throws Exception {
// ArrayList
{
ArrayList arraylist = new ArrayList();
arraylist.add(0, "end");//Ö¸¶¨Ë÷Òý¼ÓÈëÖµ
// Ðè×¢ÒâµÄÊÇ£¬Èç¹ûÏÖÓÐ2¸öÖµ£¬ÎÒÓÈëË÷Ò?µÄÄÇô¾Í»á³öÏÖÒì³£
for (int i = 0; i < 2; i++) {
arraylist.add(i, String.valueOf(i));
}
System.out.println("ArrayList:");
for (int i = 0; i < arraylist.size(); i++) {
System.out.print(arraylist.get(i) + ";");
}
arraylist.add("0");//Ö±½Ó¼ÓÈëÖµµ½ArrayListµÄ×îºó
arraylist.add("0");
System.out.print(" ArrayList's lastIndexOf("0") is "
+ arraylist.lastIndexOf("0"));
}
// Arrays
{
String[] array = new String[] { "a", "b", "c" };
List list = Arrays.asList(array);
System.out.println(" Arrays:");
for (int i = 0; i < list.size(); i++) {
System.out.print(list.get(i) + ";");
}
System.out.print(" Arrays's length is " + array.length);//´òÓ¡Êý×éµÄ³¤¶È
}
// Collections
{
String[] array = new String[] { "a", "b", "c" };
List list = Arrays.asList(array);
Collections.fill(list, "Fill");//ÓÃFillÌî³äÈ«²¿ÔªËØ
System.out.println(" Collections:");
for (int i = 0; i < list.size(); i++) {
System.out.print(list.get(i) + ";");
}
array = new String[] { "1", "2", "3" };
List list2 = Arrays.asList(array);
Collections.copy(list, list2);//¿½±´list2µÄÊý¾Ý½ølist
System.out.println(" " + list);
Collections.swap(list, 2, 1);//µ÷»»Ë÷ÒýΪ1ºÍ2µÄÔªËصÄλÖÃ
System.out.println(list);
}
// EventObject
{
String s = "hello";
String s2 = s;
EventObject eventobject = new EventObject(s);//Ò»¸ö×¼ÈÝÆ÷ÀàÐÍ£¬È·ÇеĹéÀàËü²»ÊÇÈÝÆ÷
System.out.println("EventObject:");
System.out.println(eventobject.getSource());
System.out.println(eventobject.equals(s2));
}
// HashMap
{
HashMap hashmap = new HashMap();//Ò»¸öËÙ¶È×î¿ìµÄÈÝÆ÷
hashmap.put("0", "c");
hashmap.put("1", "a");
hashmap.put("2", "b");
hashmap.put("3", "a");
System.out.println("HashMap:");
System.out.println(hashmap);//¸ÃÈÝÆ÷ÓÐ


Ïà¹ØÎĵµ£º

java ʹÓÃÏà¶Ô·¾¶¶ÁÈ¡Îļþ

http://www.blogjava.net/flysky19/articles/93492.html
1.java project»·¾³£¬Ê¹ÓÃjava.ioÓÃÏà¶Ô·¾¶¶ÁÈ¡ÎļþµÄÀý×Ó£º
 *Ŀ¼½á¹¹£º
  DecisionTree
            |___src
             ......

[¾­µä]ÊÇjava¸ßÊ־ͽøÀ´£¬¿´Ò»ÏÂÄãµÄˮƽ£¬1.5%ÕýÈ·ÂÊ

ÕâµÀÌâÊÇÒ»¸öjava¹«Ë¾µÄ±ÊÊÔÌ⣬¿¼²ìÁË´ó¸Åһǧ¶à¸öÃæÊÔµÄjava¹¤³ÌʦÒÔ¼°ÏîÄ¿¾­Àí£¬²»¹ýÈ«¶ÔµÄÖ»Óв»µ½1.5%
 
ÔÚ×öÕâ¸öÌâµÄʱºòÇ밴˳Ðò×ö£¬²»Äܸıä˳Ðò£¬×öÇ°ÃæÌâʱ£¬²»Äܲ鿴ºóÃæµÄÌ⣬ͬÉÏÒ²²»Òª²é¿´ÏÂÃæµÄ»Ø¸´,²»Òª¸Ä±äÄãµÄ´ð°¸
 
¶àµÄÏȲ»Ëµ£¬Çë°ÑÏÂÃæµÄÌâ´ð°¸¸ø³ö
 
class Human{
static ......

Java³£ÓÃ×Ö·û¼¯±àÂëÏê½â

Java³£ÓÃ×Ö·û¼¯±àÂëÏê½â
      Web¿ª·¢µÄʱºò¾­³£»áÓöµ½Ò»Ð©×Ö·û±àÂëµÄ´íÎó£¬ÈçÒ³ÃæÂÒÂëµÈÎÊÌ⣬ËùÒÔÓбØÒªÐè¶Ô×Ö·û±àÂëÓÐËùÁ˽⣬ÒÔÏÂÊÇRickiÊÕ¼¯µÄһЩ×ÊÁÏ£¨¿ÉÄܲ»ÊǺÜÈ«£¬µ«Ï£Íû¶ÔÄãÓÐËù°ïÖú£©
      Java±ê×¼×Ö·û¼¯£ºËùνJava±ê×¼×Ö·û¼¯£¬¾ÍÊÇJavaƽ̨֧³ÖµÄ×Ö·û ......

Java6 ½Å±¾ÒýÇæ(ÓÃJavaµ÷ÓÃJS½Å±¾)µ÷ÓÃjs

Java6 ½Å±¾ÒýÇæ(ÓÃJavaµ÷ÓÃJS½Å±¾)µ÷ÓÃjs
 import java.io.FileNotFoundException;
 import java.io.FileReader;
 import javax.script.Invocable;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
 import javax.script.ScriptException;
 
&n ......

Java¿ì½Ý¼üÖÆ×÷

Java¿ì½Ý¼üÖÆ×÷
ÓùýVBµÄÖªµÀ°´ÏÂF5ÊÇÔËÐд°Ì壬ÓùýPhotoshopµÄÖªµÀ°´ÏÂTabÊÇÒþ²ØËùÓÐÃæ°å
£¬ÄãµÄJava³ÌÐòÒ²ÏëÓÐÕâ¸ö¹¦ÄÜô£¿ÄÇôϣÍûÕâƪÎÄÕ¶ÔÄúÓÐËù°ïÖú¡£
×Ӳ˵¥ÀàJMenuItemÓÐÒ»¸ö·½·¨²»ÖªµÀÄã×¢Òâ¹ýûÓÐ:setAccelerator¡£
´ò¿ª°ïÖúÎļþ¶ÔÕâ¸ö·½·¨µÄÃèÊöÊÇ£º ÉèÖÃ×éºÏ¼ü£¬ËüÄÜÖ±½Óµ÷Óò˵¥ÏîµÄ²Ù×÷
ÕìÌýÆ÷¶ø²»±ØÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ