posts - 97,  comments - 93,  trackbacks - 0
These days I want to review some java classes and post them,cos i come to realize that i hava been coming to forget some of them, my god,Katrina,....:) it's really the sound,and u ? ...regarding MVC,cos be delayed, and may be will better.

List a class to use the title Properties.

import java.util.Properties;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class FirstDayTestProperties {
   public static void main(String[] args) throws Exception{
       Properties ProTest = new Properties();
       String  fileName="PropertiesTest.properties";
      
       try{
          ProTest.setProperty("lastDir","C:\\PropertyTest");
          ProTest.store(new FileOutputStream(fileName),null);
       }catch(IOException e){
            e.printStackTrace();
       }

       try{
          FileInputStream inStream=new FileInputStream(fileName);
          ProTest.load(inStream);
          ProTest.list(System.out);
       }catch(FileNotFoundException e){
          e.printStackTrace();
       }
   }
}
The class I just write now without any testing,but i think it seems no errors:).Share.

posted on 2007-04-04 21:32 wqwqwqwqwq 阅读(463) 评论(0)  编辑  收藏 所属分类: Simple Java

只有注册用户登录后才能发表评论。


网站导航:
 
<2007年4月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345




常用链接

留言簿(10)

随笔分类(95)

随笔档案(97)

文章档案(10)

相册

J2ME技术网站

java技术相关

mess

搜索

  •  

最新评论

阅读排行榜

校园梦网网络电话,中国最优秀的网络电话