Java Programming Tutorial – 79 – Creating Files

Java

Video is ready, Click Here to View ×


Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts

34 thoughts on “Java Programming Tutorial – 79 – Creating Files

  1. Please dude bring back THE MOTHER FKIN CHANNEL MAN create content like this the more updated version. I swear to god would be the best thing for any programmers. You just did one lecture from my professor in 7 min.

  2. Creating an image file:
    BufferedImage img = ImageIO.read(new File("image.png")); — Just a way for you to get an image
    File file = new File("newimage.png"); — The file to write the image to
    ImageIO.write(img, "png", file);

    This program would take an already existing image from the computer, and then write that same image into a new file, essentially copying the image into a new file. This could be useful if you had a program that you wanted to generate images, you would just put the images in a folder, and generate those images elsewhere.

    The main use for creating images I can think of would be if you wanted to build a paint program. I doubt anyone would do that I just wanted to share this code because it's cool.

    You can also use JPGs, BMPs, GIFs, etc, but I prefer PNG format.

  3. They are called Exceptions because they are for exceptional circumstances. You can use them to catch all sorts of things. For example, you ask a user to type his age. You are expecting an integer and he types in five. You can catch that and act accordingly.

Leave a Reply

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