Java Programming Tutorial – 80 – Writing to Files

///Java Programming Tutorial – 80 – Writing to Files

Java Programming Tutorial – 80 – Writing to Files

FavoriteLoadingAdd to favorites

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –

source

Java468x60
By |2020-09-11T09:21:42+00:00September 11th, 2020|Java Video Tutorials|50 Comments

50 Comments

  1. niayesh shafieyan September 11, 2020 at 9:21 am - Reply

    what can i do if i want to add date to a file that it exist in my computer?

  2. ClipsAround TheWorlds September 11, 2020 at 9:21 am - Reply

    Can we locate that file on computer?If yes can we create it in specific folder?How?

  3. Nazifa Mohyuddin September 11, 2020 at 9:21 am - Reply

    Who did he use final Formatter x;
    in the last video, but now he's using
    private Formatter x; ???

    And I can't find my file in eclipse 🙁 heeelp pls

  4. Immortal Llama September 11, 2020 at 9:21 am - Reply

    did not work for me

  5. Jonathan Martin September 11, 2020 at 9:21 am - Reply

    The 46 dislikes are people who had a chinese.txt file and didn't realize it until it was too late

  6. Henry Code September 11, 2020 at 9:21 am - Reply

    Nice work bro👍

  7. Mart Gjepali September 11, 2020 at 9:21 am - Reply

    i wanted to know how to write from the console like we do it with the Scanner input , i understand how to do it directly from the code but what about from the console

  8. Cristi Macovei September 11, 2020 at 9:21 am - Reply

    What if I want to print to a file that already exists ?

  9. inga han September 11, 2020 at 9:21 am - Reply

    w/ this program i can be a god now tnx 2 u

  10. muskan rath September 11, 2020 at 9:21 am - Reply

    The output shows exception in thread main java. lang.NullPointerException

  11. Tuan Nguyen September 11, 2020 at 9:21 am - Reply

    To much differences , the gap is 10 years .

  12. X Unknown September 11, 2020 at 9:21 am - Reply

    how can i save the data with the format like this:
    20
    bucky
    roberts
    instead of:
    20 bucky roberts

  13. overing07 September 11, 2020 at 9:21 am - Reply

    If you want to make a new line after the string, just add %n not n, add that after "%s%s%s%n", thank me later.

  14. Yesid Martins September 11, 2020 at 9:21 am - Reply

    hahahaha chinese.txt xD

  15. BLUE September 11, 2020 at 9:21 am - Reply

    thanks bro!!

  16. Raiderrx September 11, 2020 at 9:21 am - Reply

    did he just assume the contents of my documents folder XD

  17. ChandlerKnowsBest September 11, 2020 at 9:21 am - Reply

    I love how random he is. chinese.txt
    "You probably don't have that either"

  18. eXDee September 11, 2020 at 9:21 am - Reply

    u r better than my comp science teacher, thank you so much.

  19. Shawn September 11, 2020 at 9:21 am - Reply

    Bucky was thinking about Chinese food for dinner while making this video 🙂

  20. Anas ahmed September 11, 2020 at 9:21 am - Reply

    Fuck, I had a file name Chinese there goes my list of Chinese restaurants.

  21. 徐宏杰 September 11, 2020 at 9:21 am - Reply

    中国人在此!

  22. Itasneemz September 11, 2020 at 9:21 am - Reply

    Thank you, you helped me♥️
    I have something I want to ask about can I do all this work in the main?

  23. pite9 September 11, 2020 at 9:21 am - Reply

    I like the crickets!

  24. Johan Almgren September 11, 2020 at 9:21 am - Reply

    These clips are now 8 years old, do people code like this still? Like having two "files" open and coding in each of them makes no sense to me as I have been just coding for 2-3weeks. And java guide book is completely different.

  25. Celestial21 September 11, 2020 at 9:21 am - Reply

    Just wondering .. can you do this import java.*

  26. paolo bergomi September 11, 2020 at 9:21 am - Reply

    Awesome tutorial, thanks Bucky

  27. eman9 seca September 11, 2020 at 9:21 am - Reply

    Great video thank you so much for your hard work!

  28. John Lima September 11, 2020 at 9:21 am - Reply

    It's pretty direct and simple. It doesn't work for multiple registers, tough.
    Maybe in the next video.

  29. malchemystic September 11, 2020 at 9:21 am - Reply

    Thanks for teaching what our mediocre educational system cannot despite having the audacity of charging what it costs.

  30. HAITHAM September 11, 2020 at 9:21 am - Reply

    what does close function do

  31. Daniel Herman September 11, 2020 at 9:21 am - Reply

    I can add records with an input??

  32. Melissa Mahan September 11, 2020 at 9:21 am - Reply

    How can I have the user input the records to the file?

  33. Nick Valentine September 11, 2020 at 9:21 am - Reply

    I have a little problem with this method. It rewrites the text file each time I launch the program! How to solve this problem?

  34. dlane September 11, 2020 at 9:21 am - Reply

    Is this all defunct since Java 8 came onto the scene?

  35. Joshua Root - Development for All September 11, 2020 at 9:21 am - Reply

    Enjoying not following the class naming conventions set by Oracle, huh? 😛

  36. Mohammad Mahjoub September 11, 2020 at 9:21 am - Reply

    Why is bucky trying to handle exceptions? When will you get an error while create a file?

  37. mwadhara September 11, 2020 at 9:21 am - Reply

    This videos have helped me understand java as they are more practical and easy to understand plus the clarity is good.

  38. Perjergersen September 11, 2020 at 9:21 am - Reply

    How would you write to the same file but not overide it. Ex: a contact book that when you ran the program you could choose to either add to an existing contact list or search that file for existing contacts.

  39. Zahraddeen Abdullahi September 11, 2020 at 9:21 am - Reply

    nice toturials

  40. Soakedboy September 11, 2020 at 9:21 am - Reply

    What's the point of the catch in this scenario?
    If there's no file with filename "Fred.txt" in the location I'm creating in, it lets me create "Fred.txt"
    If there already is "Fred.txt" in location, it still lets me create a new "Fred.txt"
    When would the catch part of the try…catch actually get executed?

  41. Prince Gupta September 11, 2020 at 9:21 am - Reply

    This was easy and iteresting.

  42. Pratik Bharadwaj September 11, 2020 at 9:21 am - Reply

    Its not letting me add more than one piece of data to the file. For example, if I do, x.format("Bob", "Alex, "Charlie); it only shows Bob in the file. I have to x.format(one piece of data) every time does anyone know whats going on? Help pls

  43. Eugene Kuzmov September 11, 2020 at 9:21 am - Reply

    what is an x? a build-in object?

  44. Arnav Narula September 11, 2020 at 9:21 am - Reply

    Just pointing it out there, you can run the code in one class instead of making a second "main" class,  by adding: public static main void (String[] args) { "Insert Stuff"} right before the last parenthesis (that signals the end of class).

  45. MrEnderChop September 11, 2020 at 9:21 am - Reply

    How do I overwrite existing data in the file?

  46. SepiaDragoonGR September 11, 2020 at 9:21 am - Reply

    Ιf I wanted to write something else inside this file, like new information or smth, how would i do it? Could i declare a new value maybe y and do the following: (in their corresponding blocks)
    y = new Formatter("chinese.txt"); //so that it can add to the file without creating it again
    y.format(~~~whatever~~~);
    y.close();

  47. Let's_have_fun September 11, 2020 at 9:21 am - Reply

    String.format() isn't supporting in my java. how we can fix it??

  48. Mashable September 11, 2020 at 9:21 am - Reply

    When you have Avenging to do but also have to teach programming 😀 that's BUCKY :3

  49. Forgan Mreeman September 11, 2020 at 9:21 am - Reply

    you should create a program that tracks down who dislikes your videos so I can beat their ass

  50. Hurricoaster September 11, 2020 at 9:21 am - Reply

    Interestingly, for the Formatter class, the command n doesn't work as with String.format(). Instead use %n.

Leave A Comment

*