Java Programming Tutorial – 80 – Writing to Files

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

24 responses to “Java Programming Tutorial – 80 – Writing to Files”

  1. Venegal Avatar

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

  2. HAITHAM Avatar

    what does close function do

  3. Daniel Herman Avatar

    I can add records with an input??

  4. Melissa Boyce Avatar

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

  5. Nick Valentine Avatar

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

  6. D_lane Avatar

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

  7. Josh the Gamer Avatar

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

  8. Mohammad Mahjoub Avatar

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

  9. mwadhara Avatar

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

  10. LikeMikeSIKE Avatar

    I try to run this and it says "Error: Main method not found in class"

  11. Swife Avatar

    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.

  12. Soakedboy Avatar

    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?

  13. Prince Gupta Avatar

    This was easy and iteresting.

  14. Pratik Bharadwaj Avatar

    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

  15. Eugene Kuzmov Avatar

    what is an x? a build-in object?

  16. Arnav Narula Avatar

    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).

  17. MrEnderChop Avatar

    How do I overwrite existing data in the file?

  18. SepiaDragoonGR Avatar

    Ι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();

  19. Let's_have_fun Avatar

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

  20. Mashable Avatar

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

  21. FrogLungs Avatar

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

  22. Hurricoaster Avatar

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

  23. Shoaib Ahmed Avatar

    y does he always keep itching his EAR…???? it feels so GROSS…..S.!@#$%^&*()

Leave a Reply

Your email address will not be published. Required fields are marked *