37 thoughts to “Java: Read Text File Easily”

  1. This video was too fast. Couldn't understand everything clearly in the end. πŸ˜•πŸ˜•
    You used codes nver used before and didn't even explain them.
    I hope you'll cover them in next videos.
    Thank you.

  2. dear i appreciate your video, is it possible for you to add a video situation (there is a text file and we have to create method that load the file and second method that can read the file) and finally we can print out the element required using these methods in main class..

    for example a customer text file with customer data. so we can search data , add and remove.

    many thanks in advance

  3. How would I change this to read from a file given at runtime? Like the user would run the java file along with the text file e.g java Test1 input.txt

  4. Can I make this read only the last line and use the info in the last file to manipulate a variable.

    For example: I'm trying to store a variable for a count of case files so every time I create a new patient in the java program it gives him a new number for his case file

    ps: I hope I explained it well. Probably I didn't. Sorry. LOL

  5. Hi Alex. Can anyone suggest how to convert the .wav (audio file) to a text file and vice-versa in Java?

  6. Love your content bro, would like to have a conversation with you sometime ( about literally anything ) but work can come first lol
    If thats okay with you ? πŸ˜€

  7. Awesome video and your teaching style is great… New sub and thanks for the text file website link…. very interesting page.
    One question:
    I was reading a Java(8) book the other day and the Scanner was used like this:
    Scanner diskScanner = new Scanner(new File("fileNamehere.txt"));

    but you did it like this:

    Scanner scan = new Scanner("fileNamehere"));

    Your way is shorter , but why books teach the longer version?
    Thanks…

  8. I have a series of lines in a txt file that is supposed to store data for a character node. Here's an example of the txt file:

    6
    5
    7
    8
    Dual Slicer
    Bad

    When I scan through the numbers by putting scan.next() and then attempt to scan the words by putting scan.nextLine(), it doesn't scan that word at all. Idk how to explain it but when I put it all in a string here's what I would get:

    6
    5
    7
    8

    Bad

    How do you fix this?

  9. Thanx for the video, but I got a question I wish if u can explain it …
    If we have a larage numbers of data to enter to the program we r writing , I found on a book we can use the following synax:
    Java ClassName< input.txt

    But I couldn't find enough information about it

  10. Can you use Scanner to read formatted text, I mean out of say 3 columns of numbers, choose jist the first column and print?

  11. If i could give you a million likes, I would. Thank you for your friendly presentation and the useful content. Thank you !!! πŸ‘πŸ‘ŒπŸ‘πŸ‘ŒπŸ‘πŸ‘ŒπŸ‘

  12. Done done = new Done();
    Keep up the excitement in your coding. Your tutorials are so helpful, I'm in a coding Boot Camp right now and I reference your vids all the time. I have shared your channel with many of my fellow classmates too. Keep them up.

  13. Having watched a ton of java tutorials, I can easily say this video is one of the clearest, efficiently communicated videos out there with a good level of production value. I can't say thank you enough for that! Count me as subscribed…

Leave a Reply

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