java¶ÁÈ¡txtÎı¾
public List createArrayList(String FilePath,String FileName){
List list =new ArrayList();
FileName=FilePath+"\\"+FileName;
File file=new File(FileName);
String encoding="GBK";//·ÀÖ¹ÂÒÂë Õâ±àÂëÐèÒª¸ù¾Ý×Ô¼ºµÄ²Ù×÷ϵͳĬÈϵıàÂëÀ´ÉèÖÃ
String str=null;
try{
if(!file.exists()) file.createNewFile();
FileInputStream fis= new FileInputStream(file);
InputStreamReader read=new InputStreamReader(fis,encoding);
BufferedReader br = new BufferedReader(read);
while((str=br.readLine())!=null)
{
str=new String(str);
str=str.substring(str.indexOf("--")+2);
// System.out.println(str);
list.add(str);
}
}catch(Exception ee){
ee.getMessage();
}
return list;
}// end mothod
Ïà¹ØÎĵµ£º
½üÀ´Ñ§JSP+SSH£¬ÏÂÔØÁËMyEclipse 8.0 M1£¬ÍøÉÏÕÒµ½µÄ×¢²áÂëʵÔÚ²»¶à£¬ÕæµÄ²»¶à£¬¾ÍÄÇôһ¸ö£¬±¾ß°¡£¬Òª²»¾ÍÊÇ×¢²á»ú£¬ÎÞÒâÖп´µ½Ò»¸öºÃ¶«Î÷£¬ÓÃJavaÉú³É×¢²áÂ룬Ô×÷¶¼ÊÇËÎÒ²»ÖªµÀ£¬Èç¹û×÷ÕßÈÏΪÎÒ²»¸Ã°ÑÕâЩ´úÂëÌûÔÚÕâÀÇë¸æÖª£¬ÎÒÂíÉÏɾ³ý¡£²»¶à˵£¬ÉÏ´úÂ룺
import java.io.BufferedReader;
im ......
ArrayList ºÍVectorÊDzÉÓÃÊý×鷽ʽ´æ´¢Êý¾Ý£¬´ËÊý×éÔªËØÊý´óÓÚʵ¼Ê´æ´¢µÄÊý¾ÝÒÔ±ãÔö¼ÓºÍ²åÈëÔªËØ£¬¶¼ÔÊÐíÖ±½ÓÐòºÅË÷ÒýÔªËØ£¬µ«ÊDzåÈëÊý¾ÝÒªÉè¼Æµ½Êý×éÔªËØÒƶ¯µÈÄÚ´æ²Ù×÷£¬ËùÒÔË÷ÒýÊý¾Ý¿ì²åÈëÊý¾ÝÂý£¬VectorÓÉÓÚʹÓÃÁËsynchronized·½·¨£¨Ḭ̈߳²È«£©ËùÒÔÐÔÄÜÉϱÈArrayListÒª²î£¬LinkedListʹÓÃË«ÏòÁ´±íʵÏÖ´æ´¢£¬°´Ðòº ......
1.Ï̴߳´½¨µÄÁ½ÖÖ·½Ê½
1£©À©Õ¹ThreadÀಢÖØдpublic void run()·½·¨
ps£º
¶¨ÒåỊ̈߳º
class myThread extends Thread(){
public void run(){
System.out.println("Ju ......
×ܽáÒ»£º
Java IOµÄÒ»°ãʹÓÃÔÔò£º
Ò»¡¢°´Êý¾ÝÀ´Ô´£¨È¥Ïò£©·ÖÀࣺ
1¡¢ÊÇÎļþ£º FileInputStream, FileOutputStream, FileReader, FileWriter
2¡¢ÊÇbyte[]£ºByteArrayInputStream, ByteArrayOutputStream
3¡¢ÊÇChar[]: CharArrayReader, CharArrayWriter
4¡¢ÊÇString: StringBufferInputStream, StringReader, StringW ......
½ñÈÕ¶Áµ½csdnµÄÐÂÎÅ¡¶ÓûΪJava¼¼Êõ´óÅ£ËùÐèµÄ25¸öѧϰҪµã¡·£¬Á˽âÒª×öÒ»¸öJava¼¼Êõ´óÅ£¿É²»ÊÇÒ»°ãÒ»°ãµÄ£¬ÌØÊÕ¼ÔÚ´Ë£ºÒÔ±Þ²ß×Ô¼º²»¶Ïѧϰ£º
1. ÄãÐèÒª¾«Í¨ÃæÏò¶ÔÏó·ÖÎöÓëÉè¼Æ(OOA/OOD)¡¢É漰ģʽ(GOF£¬J2EEDP)ÒÔ¼°×ÛºÏģʽ¡£ÄãÓ¦¸ÃÁ˽âUML£¬ÓÈÆäÊÇclass¡¢object¡¢interactionÒÔ¼°statediagrams¡£
2. ÄãÐèҪѧϰJavaÓïÑÔ ......