tag:blogger.com,1999:blog-8712770457197348465.post959909179155402429..comments2024-03-28T02:47:19.159-07:00Comments on Javarevisited: How to Create File and Directory in Java Example - Java IO Tutorialjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-8712770457197348465.post-18762039890581620962018-02-08T10:18:07.156-08:002018-02-08T10:18:07.156-08:00import java. io.DataInputStream;
import java. io. ...import java. io.DataInputStream;<br />import java. io. File;<br />import java. io. Exception ;<br />Class file<br />{<br />public static void main(String args[])<br />{<br />DataInputStream in=new DataInputStream(System. in);<br />String r="" ;<br />Try<br />{<br />r=in. readLine() ;<br />String s1 =r +".txt";<br />File f1=new File(s1) ;<br />f1. createNewFile() ;<br />} catchAnonymoushttps://www.blogger.com/profile/15610919869526702808noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-28589992941234701972017-12-13T03:50:49.572-08:002017-12-13T03:50:49.572-08:00How to write program in java create folder and sto...How to write program in java create folder and store multiple files then count how many files are stored in folder Anonymoushttps://www.blogger.com/profile/07961262551008059500noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-81619372304261216852016-05-11T03:52:09.824-07:002016-05-11T03:52:09.824-07:00Really nice and different Technic. Easy to underst...Really nice and different Technic. Easy to understand each function. <br />thanks.Anonymoushttps://www.blogger.com/profile/11693818591681019263noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-17344943348617798102016-05-04T12:42:35.368-07:002016-05-04T12:42:35.368-07:00Hi , i need program for below statement , Please h...Hi , i need program for below statement , Please help me<br />please send it my email <br />email : sowjir.netdev@gmail.com<br />Design & code a very simple in-memory file system and expose the file system operations e.g. create, read, write, list over HTTP.<br /> code should:<br /><br />* Be modular and re-usable<br /><br />* Be Easy to test<br /><br />* Demonstrate Anonymoushttps://www.blogger.com/profile/11529002925574668591noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-692411291254471222014-03-29T21:32:05.983-07:002014-03-29T21:32:05.983-07:00Can anyone show me how do I create a file with a n...Can anyone show me how do I create a file with a name come from a user input?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-82906692410726029282013-12-22T06:28:27.832-08:002013-12-22T06:28:27.832-08:00Hi, I am Vimala i need a complete program like:
Th...Hi, I am Vimala i need a complete program like:<br />There is a file or folder in that 100 resumes are there, we have to find a perticuler name and phone no among those resumes and print that name and phone no using simple core java program.<br />(There is a file or folder in that 100 resumes we have to search a name and phone no and print using simple core java program)<br />Please help me out Anonymoushttps://www.blogger.com/profile/04416120017878899501noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-12832559357982372872011-12-28T07:12:08.996-08:002011-12-28T07:12:08.996-08:00Hi Anonymous, thanks for your comment. Indeed usin...Hi Anonymous, thanks for your comment. Indeed using PATH separator is great idea that makes your code to run on both windows and unix, but samples are just to do it quick rather than do it perfectly but yes in production code path should not be hardcoded.Javin @ spring interview questions answershttp://javarevisited.blogspot.com/2011/09/spring-interview-questions-answers-j2ee.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-71003951895826516082011-12-28T06:18:35.073-08:002011-12-28T06:18:35.073-08:00Nice explanation. I wish you did not use the hard-...Nice explanation. I wish you did not use the hard-coded path in your example but use path separator to create a file instead. It somewhat defeats the purpose of your own tutorial.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-88771288881906951842011-12-15T00:42:24.692-08:002011-12-15T00:42:24.692-08:00These are very nice examples.
Very clear and easy...These are very nice examples. <br />Very clear and easy to understand every one.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-40972285359099982612011-12-13T05:22:49.656-08:002011-12-13T05:22:49.656-08:00Thanks for you comment keval . Good to know that y...Thanks for you comment keval . Good to know that you like my file creation tutorial. What is worth to remember is that closing any file which has been opened by java Program and handling of File related exception to make your Java program more robust. You may also like my new tutorial on files as <a href="http://javarevisited.blogspot.com/2011/12/read-and-write-text-file-java.html" rel="nofollow"Javin @ tar command in unixhttp://javarevisited.blogspot.com/2011/11/tar-command-in-unix-linux-example.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-13001151992231467342011-12-05T10:45:42.949-08:002011-12-05T10:45:42.949-08:00A nice post.. Never thought this can also be done....A nice post.. Never thought this can also be done.. here is my link on how to read and write into files in java <a href="http://www.code2learn.com/2011/11/reading-and-writing-into-file-in-java.html" rel="nofollow"> Reading and Writing to Files a Java Tutorial</a>Farhanhttps://www.blogger.com/profile/13928134991864169687noreply@blogger.com