wood burning stoves*
The moose likes Beginning Java and the fly likes create file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "create file" Watch "create file" New topic

create file

abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635
What is the name of the file that is created by this code

Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

None. No file is created. Check out the File api to figure out which one's do.

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635
I understand it needs createNewFile() method

But still doesn't know what will be the name?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

If you call createNewFile() on the File object, it will create a file named bar in the /tmp directory.

Please read the documentation of class java.io.File.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
I agree. Here's the link: http://aspose.com/file-tools
subject: create file
Similar Threads
hibernate save object problem !
file input... please help
TLD jsp
way to convert text to vaild string
write data from database table to a csv file