File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rename File is fail

 
Randika Isuru
Ranch Hand
Posts: 38
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
please any one can tell me why this code give me a output false
are there any thing wrong in my code i don't think so. please correct me



This code give me output : File renamed? false

Thanks...
 
Henry Wong
author
Marshal
Pie
Posts: 20833
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Randika Isuru wrote:
please any one can tell me why this code give me a output false
are there any thing wrong in my code i don't think so. please correct me



This code give me output : File renamed? false




Try it from the command line. Create two files (anyway you like). And then try to rename one of the files to be the same as the name of the other file. You will notice that the operating system doesn't like that.

Henry
 
Randika Isuru
Ranch Hand
Posts: 38
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ohhhhhhhhh no!!!
i forget that
Thank you very much "Henry Wong"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic