Topic: first 贴 (I'm a rookie)(createNewFile()怎么用?)

  Print this page

1.first 贴 (I'm a rookie)(createNewFile()怎么用?) Copy to clipboard
Posted by: adolf_lbh
Posted on: 2006-04-12 10:15

有知道 createNewFile() 方法 怎么用的吗?

2.Re:first 贴 [Re: adolf_lbh] Copy to clipboard
Posted by: roastduck
Posted on: 2006-04-12 10:34

看手册

3.Re:first 贴 (I'm a rookie) [Re: adolf_lbh] Copy to clipboard
Posted by: adolf_lbh
Posted on: 2006-04-12 10:34

咯....

4.Re:first 贴 (I'm a rookie) [Re: adolf_lbh] Copy to clipboard
Posted by: roastduck
Posted on: 2006-04-12 14:01


import java.io.*;

class createNewFileDemo
{
  public static void main(String[] args)
  {
    try
    {
      File f = new File("testfile.txt");
      boolean b = f.createNewFile();
      System.out.println(b);
    }
    catch (Exception e)
    {
      System.err.println(e);
    }
  }
}

5.Re:first 贴 (I'm a rookie) [Re: adolf_lbh] Copy to clipboard
Posted by: adolf_lbh
Posted on: 2006-04-17 14:31

3q


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923