Java Video Tutorial 32

[ad_1]
Get the Code:

In this part of my Java Video Tutorial, I completely cover how to both write to and read character streams from files.

I explain all of the following: PrintWriter, BufferedWriter, FileWriter, BufferedReader, FileReader, common file exceptions and much more.


Posted

in

by

Tags:

Comments

21 responses to “Java Video Tutorial 32”

  1. Afonso Maria Pereira Avatar

    am i able to read just 2 costumers and how to do that?.

  2. dullahan LC. Avatar

    I love you and I love your videos. Keep it up

  3. Pattbonn47 Avatar

    "Well, hello Internet….

    …Otherwise, till next time…"

    Brilliant as usual.

    Folks, if you're having trouble following just pause and go back, that's the beauty of it.
    Also helpful to have the full commented code (link in the description) beside you as a reference.

  4. Reubin Pak Avatar

    How do you make it if its in the wrong format it tells you it is wrong and moves on to the next token?

  5. sarath prakash Avatar

    Not easy to understand, may be not suggested for beginners…..

  6. Viktor Nuevo Avatar

    Small question, when you create the constructor method "Customer", why do you declare the variables again? Isn't it enough this way?:
    public Customer(firstName, lastName, custAge){}

  7. Sascha Jung Avatar

    Excuse me if this is kind of a dumb question, but I'm a bit confused why the Customer class needs to be static…I just read somewhere else that it then behaves like any other top-level class, so it would just be for convenience purposes but…what exactly does happen there technically? Thank you very much.

  8. Luke Skywalker Avatar

    Should I keep watching your videos if I want to go for android development? Primarily just making gaming apps.

  9. Sarrah Wilson Avatar

    I can't wait for this summer. I plan to go through every video to refresh.

  10. Lovi Avatar

    Welcome to the default package of DOOM enjoy your stay! 😀

  11. Nitin Tiwari Avatar

    To all who are are asking why returned null in PrintWriter createFile(); they have to return PrintWriter variable in try Block like this – try{

    File listOfName=new File(string);
    PrintWriter infoToWrite=new PrintWriter(new BufferedWriter(new FileWriter(listOfName)));

    return infoToWrite;

    }catch(IOException e){

    System.exit(0);
    }

    return null;
    so if the will be no exception it will return the PrintWriter else there will be exception

  12. Andy Chrzanowski Avatar

    Is it possible to generate a .png file or some other sort of image file with java?

  13. Kier Bunnyhood Avatar

    +Derek Banas Is there a more convenient and "modern" way of doing this now? That was a lot of ugly spaghetti code ( no offence, it's not you – it's Java ) for something that should really be very simple. Has anything been added since 2012?

  14. Alexandre Velasco Avatar

    i wanna go into a little project that involves the use of webcam. where do i go to get the raw information from the camera? wanna do something like a QR code reader.. in java

  15. Sven Austen Avatar

    What if I dont want the Typewriter to overwrite the File that is in the given position, but instead just write new information to it? Does that work somehow?

    Or, to say it in other words: can you create a new File Object and assign it the value of an existing file without overwriting it?

    One more thing: Great videos, Im really enjoying them!

  16. Simran Singh Avatar

    Now this tutorial just used my brain completely. i could feel storm in my head. Found it "not easy".

  17. Suhas C Avatar

    Hi guys! … As known there is a "return null" statement in the method "private static PrintWriter createFile(String fileName){}" . Is the "return null" statement executed only, when both "try" and "catch" blocks fail..? If it does so isn't it a return type mismatch! ??.. Because clearly the method has to return a "PrintWriter" object only … Isn't it ? Any help please! ?

  18. Nathan Bendich Avatar

    +Derek Banas I love the videos; I'm a fan. Just a bit of constructive criticism:

    If you made the info blurbs like ("Code available in description") pop up when you're not saying/doing anything, that would make it easier to focus on the content. I realize that viewers want to know where to get the code, and you want us to subscribe, comment, share, like, etc. and that's all well and good. But the reason we came is to UNDERSTAND something new, and if every minute or so I get distracted by a friendly little pop up, it breaks my focus on what you're saying.

    I realize you probably get many comments per day, but I think this one could really help people and also get you more subscribes.

    Cheers,
    Nathan

  19. Jonathan Chatzia Avatar

    Thank you very much!!Your help is valuable..You 're awesome.

  20. mark forbes Avatar

    I have a java program that takes the name of a product (in String form) and returns and image of the barcode associated with that product. How can I send the image of the barcode to a receipt printer?

  21. Rochak Gupta Avatar

    +Derek Banas, can you please explain as to why making Customer class' data members private still allows them to be used via its object in CreateCustomers method. I am confused as to why this is happening.

Leave a Reply

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