KingDemo

作者在 2011-09-07 15:29:43 发布以下内容
class kingDemo{
    public  static  void  main(String args[]){
         System.out.println("Input one Character\n");
         String s ="jfei";
         System.out.println(s.length());
         System.out.println(s.charAt(23));
         System.out.println();
         System.out.println(s.substring(1,s.length()/2));
         System.out.println(s.indexOf(3));
         File  f  = new File(".");
         System.out.println(f.getName());
         System.out.println(f.getFileName());
         System.out.println(f.getPath());
         System.out.println(f.getAbsolutePath());
         System.out.println();
         System.out.println(f.isFile());
          System.out.println(f.canRead());
          System.out.println(f.canWrite());
         System.out.println(); 
   }
   public  void print(){
       System.out.println();
       System.out.print();
       FileReader  fr  = new FileReader();
       FileWriter  fw  = new  FileWriter();
       System.out.println(fr.readInt();
       fw.write(3);
       fw.close();
       fr.close();
       fw.flush(); 
  }
}
java | 阅读 1125 次
文章评论,共0条
游客请输入验证码
浏览59385次
最新评论