Files In Java - Read Text File Easily #38

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 392

  • @alexlorenlee
    @alexlorenlee  Рік тому +3

    If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h

  • @CRAZYFASHIONTV
    @CRAZYFASHIONTV 4 роки тому +272

    It is hilarious to me that my computer science teacher spent an hour and a half lecturing of files and I didnt understand a single second of it, and then after watching you actually work in java for 7 minutes I understand.

    • @MrDemoncrusher
      @MrDemoncrusher 4 роки тому +35

      I've got the same issue man. My uni lecturer is a brilliant programmer, but an absolute garbage teacher. No body in my class is learning, because for first year students he's expecting the output of veteran programmers. If anyone asks for clarification he's very patronising and if anyone challenges him on a topic he cuts them down with his knowledge and makes them question if they're right or wrong. Even when you do the research and know you're 100% right. Sadly this seems to be common place. Very few programmers are good teachers. Most are good at one or the other. Alex *IS* one of the good ones. If Alex was my lecturer I'd actually _want_ to be a programmer. I probably say that because my lecturer has left me so jaded.

    • @rfederer8163
      @rfederer8163 3 роки тому +8

      Comments like this started getting annoying me

    • @manothamareddyreddy8831
      @manothamareddyreddy8831 3 роки тому +1

      Teacher Phobia!!!!

    • @TharaMesseroux1
      @TharaMesseroux1 3 роки тому +1

      This is called Talent my friend :)

    • @PK-td6wp
      @PK-td6wp 3 роки тому

      I am INSANELY horrible at math but I'm INSANELY good at doing math in java and javascript and other programming languages;

  • @pasiaomega3868
    @pasiaomega3868 5 років тому +131

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

  • @sohagdas8351
    @sohagdas8351 5 років тому +154

    Keep up the good work.. You're a lot underrated at the moment

  • @avishekdhakal8056
    @avishekdhakal8056 2 роки тому +1

    ngl i'm laughing rn
    I've my exams in a couple days and i literally have no concept in file handling
    i was going through every available videos in yt and i was getting more and more confused then i stumbled upon this gem
    thanks mate ..... you just saved me

  • @lordender_kitty_official
    @lordender_kitty_official Рік тому +3

    you know, you've been doing coding tutorials for at least 4+ years at the time i'm writing this comment and all of the videos you make are just crazy at the quality and the way that you explain things to make them seem so simple. i hope you keep doing this for a while and i really think you deserve more subscribers cause you are incredible at this.

  • @joselinherrera7596
    @joselinherrera7596 3 роки тому +2

    i have a 2 whole books about java and files 2 hours in class 2 videos and still didnt understand files till i saw your video. you so underrated thank you!!!!!

  • @ВадимКоролевич
    @ВадимКоролевич 2 роки тому +2

    I've been learnt English already sometimes(I'm from Ukraine), my level is low but I've understood all of this video. I think it's that because you speak very clearly. Great job!

  • @jesse5222
    @jesse5222 3 роки тому +9

    Thank you so much. As previously stated, people over teach this waaaayyy too much and make it super confusing, but you made it so simple and I was able to finally finish my project. Thank you!!

    • @ronaldringelschwanz8707
      @ronaldringelschwanz8707 2 роки тому

      Well he didn't close the scanner. This is not a good idea! And not handling the exceptions is not recommendable either.

  • @KathleenCoyle
    @KathleenCoyle 4 роки тому +1

    I am a 43 year old bassoonist who decided to go back to school for a BA/MS computer science/IT degree. I have had 50% fewer meltdowns since discovering your channel. You are a lifesaver, and I'm buying a teeshirt.

  • @RishitTeclado
    @RishitTeclado 4 роки тому +4

    this video is not about Scanner but now I actually understood what Scanner is

  • @emzas04
    @emzas04 4 роки тому +5

    Have been struggling in my Java courses for the last year and since finding your channel things are finally starting to make sense. By far the best Java tutorials on youtube. xxx

  • @osama_main
    @osama_main Рік тому +1

    Thanks

  • @elexushavis9334
    @elexushavis9334 8 місяців тому +1

    switching for medical lab tech to developing has been rough…not to mention its online and through Capella so I’m basically teaching myself.. your videos have been a godsend.

  • @Lightning_Mike
    @Lightning_Mike 4 роки тому +3

    A friend recently sent my this video and I can quite say that it made my day. Your tutorials are incredibly useful and easy to follow. Thanks and keep up the good work!

  • @emmanuelkaome7153
    @emmanuelkaome7153 3 роки тому +1

    Salute!!!, 3 years after and your explanation still the best!!

  • @bora_yazilim
    @bora_yazilim 2 роки тому

    Thats the video I want. Simple and easy to understand. I am doing cs minor right now and our lecturer spent 1hour to teach this topic. I wish you were my lecturer :(

  • @bernaaz
    @bernaaz 4 роки тому +15

    You can be everywhere in the world but you are here with me. And I appreciate it. ❤️❤️❤️

  • @toriredman8432
    @toriredman8432 Рік тому

    Your videos are helping me in my object oriented programming class four years after you made them! THANK YOU!

  • @georgetheonlyone1
    @georgetheonlyone1 5 років тому +3

    If not the best channel about Java, def. top 3. Thanks a lot Sir

  • @dansmith9859
    @dansmith9859 3 роки тому +2

    Thank you! This video was very helpful. I felt so dumb not being able to figure out how to do this, but you really made it straight-forward.

  • @spongebobsquarepants6935
    @spongebobsquarepants6935 3 місяці тому

    Here in 2024, this works like a charm for reading text files. I was stumped on how to get them for some test cases on an assignment of mine and this saved me big time.

  • @mayanksingh2292
    @mayanksingh2292 3 роки тому +1

    oh God !!! finally found such a video which I was searching for, for a week. Thank you so much. No one taught as you did.

  • @pepe-yi6bh
    @pepe-yi6bh 4 роки тому +1

    you simply make the best videos about those kind of things. every time i watch them they are super helpful and easy to understand. Ive been really struggeling with programming lately and u saved me so many times!
    THANK YOU

  • @suhanaislam1918
    @suhanaislam1918 2 роки тому

    Thanks dude......i was struggling for hours with this concept and now i understood it in just 7 minutes

  • @Crowley101
    @Crowley101 3 роки тому

    Such a tech god, and u right the 3000 I think was the key to the full potential of the program, keep it up, chief

  • @ahmadougassama6075
    @ahmadougassama6075 3 роки тому +1

    Alex, I can really say how much your videos help me ... keep up the good job !

  • @alexkim-soo2845
    @alexkim-soo2845 2 роки тому +1

    alexlee u the GOAT for java tuto

    • @alexkim-soo2845
      @alexkim-soo2845 2 роки тому

      if every teacher of java was like you, the world of "coder" would have been so much better :]

  • @LC-nk5nr
    @LC-nk5nr 2 роки тому +1

    You have no idea how helpful your videos are, thank you soooo much!!!! You break everything down in such a concise way. My final is tomorrow and just after watching this I feel so much better already. Hats off to you sir

  • @mohittyagi6694
    @mohittyagi6694 5 років тому

    this is the only tutorial which really taught me this file reading/saving thing.. man you are a great teacher. its true that anyone can be anyone's teacher.. age doesn't matter. ty man.

  • @Xerxes17
    @Xerxes17 3 роки тому

    When I'm following your videos, I'm in the habit of adding your later code points instead of replacing the earlier content. For this one I found that since the scanner had already reached the end of file printing to the console, when I called the writer the scanner would profile nothing. Since I don't know of a way to reset the scanner to line 0, I figured what I should do is put the scanner process into a new method which returns a string. It worked! But then I noticed that I wasn't using our File file, and then had to think about refactoring: keep the method using a file path string parameter, or change it to take a File object directly? whyNotBoth?.gif, which then got me thinking of method overrides and polymorphism and damn, it's good content.
    You give the viewer a rock solid example of a feature, which puts them into a strong position to extend upon it as they see fit and integrate it with other things. Top notch!

  • @TheDebzhaus
    @TheDebzhaus 2 роки тому

    Why can't everybody explain Java this clearly? Thank you for this resource!!

  • @metaylhead9413
    @metaylhead9413 Рік тому

    its funny because im already working as an app dev but im still here watching his video tutorial in Java coz reading alone made me so sleepy. XD Thank you!

  • @konstantinospetrakis4188
    @konstantinospetrakis4188 4 роки тому

    Man i rarely comment on youtube videos but i am a programming student and watching you solved soooo many problems i had in so easy and simple way. Ty and keep up the great work!!

  • @iararongindus1932
    @iararongindus1932 2 роки тому +1

    I love how you explain things in detail, hope to see more java programs.

  • @xgiridharixg.b1999
    @xgiridharixg.b1999 3 роки тому +1

    I swear it's one of the best video on files...

  • @aeroniix1489
    @aeroniix1489 Рік тому +1

    6:18 Why aren't there any red underlines at line 13 after replacing the "FileNotFoundException" with "IOException"?

  • @mrndc
    @mrndc 3 роки тому

    Bro, you just summed up an entire chapter for me in 7 min. Thank you so much!!!

  • @erindoan9243
    @erindoan9243 4 роки тому +1

    I had zero understanding of file i/o and this video helped me understand so much so easily! Thank you :)

  • @User_KanchanK
    @User_KanchanK 2 роки тому +1

    Hey Alex can you make one video on how to read pdf file in java and how to write and load this file

  • @its2467
    @its2467 2 роки тому

    What a life saving video to come into my recommended.

  • @afifkhaja
    @afifkhaja 4 роки тому +1

    Fantastic tutorial. Video complexity and length were perfect

  • @raysoto2482
    @raysoto2482 4 роки тому

    To copy and paste file path on mac: go to file and highlight- press Ctrl and click Mouse-at this point you could copy the file or press option to copy the file path

  • @Jacksonh_56
    @Jacksonh_56 5 років тому +6

    Great video man! This video really broke it the process down quickly and easily. You've gained a sub from me

  • @TPKmedia
    @TPKmedia 4 роки тому +1

    You have the best tutorials mate. Keep it up!

  • @LaysaBit
    @LaysaBit 2 роки тому

    You save me in every java project I need! Love you!

  • @justforjava192
    @justforjava192 4 роки тому +10

    Prefer StringBuilders to string concatenation, things that take linear time take quadratic time instead.

  • @YaiseAkuma
    @YaiseAkuma 2 роки тому

    It's the small things like these that made me understand programming

  • @markmata4464
    @markmata4464 2 роки тому

    Thank you so much! you are my life saver! I was able to submit my assignment because of your video!

  • @fjpa654
    @fjpa654 4 роки тому +2

    Love the video, just no music is distracting. Thanks for making it!

  • @chrahussain4109
    @chrahussain4109 4 роки тому

    I love how straightforward you are. Greetings from Kurdistan of Iraq.

  • @benlyman115
    @benlyman115 5 років тому +13

    Quality content. Keep it up!

  • @tomino133
    @tomino133 4 роки тому

    Your Java tutorials are the best man.

  • @legalhotshotsclips
    @legalhotshotsclips 5 років тому +2

    Great content.. very beginner friendly
    love from India❤️🙏

  • @0xBK201
    @0xBK201 2 роки тому

    This guy is too much! So simple and easy to follow, thank you Alex.

  • @jonathangerard745
    @jonathangerard745 4 роки тому

    You're the best teacher for Java!!!!

  • @nimrahch9337
    @nimrahch9337 4 роки тому

    Hey man im becoming your fan because you are helping me alot in my semester.big thumbs up

  • @rileyjones4854
    @rileyjones4854 3 роки тому

    You are my actual Java teacher

  • @cakobjoker8134
    @cakobjoker8134 4 роки тому +1

    Would you consider making a tutorial like this but for a bufferedReader? I'd look at other people's videos but yours are clear and easy to understand!

  • @syedyusufali1073
    @syedyusufali1073 4 роки тому +1

    Very efficient way of explaining. Thank you.

  • @anthonyrojas9989
    @anthonyrojas9989 Рік тому

    I like your videos and teaching style Alex, my only recommendation is drop the music in the background or lower it.

  • @aiden8016
    @aiden8016 3 роки тому

    why is this so much easier than my thousand dollar university course

  • @leopoldohortaleza7789
    @leopoldohortaleza7789 4 роки тому +2

    This is really helpful and your topics are spot on to what I am looking for. I am just starting in Java, and your video is fast, easy to understand and concise. This is exactly how a youtube tutorial should be.

  • @dahaliahowell1516
    @dahaliahowell1516 4 роки тому +1

    I absolutely love your videos. They're extremely helpful!

  • @akshaychauhan.5678
    @akshaychauhan.5678 2 роки тому

    hey man I love your videos thank you so much for making this playlist.

  • @nyrx7koe327
    @nyrx7koe327 Рік тому

    Thank you very much for this neatly done video! I learned more than what I thought I wanted to learn!

  • @kholoudalohabi6541
    @kholoudalohabi6541 2 роки тому +1

    It is clear and concise in a good way, Thanks 🙏🏻

  • @RomanKnav
    @RomanKnav Рік тому

    Thanks! Had to learn this for a class project.

  • @manakparmar2164
    @manakparmar2164 3 роки тому

    Thanks a lot brother. I am new in java and this video helped me a lot. again thanks👌👌👏👏

  • @xdev_henry
    @xdev_henry 3 роки тому

    A good friend once said: „Control, Shift and O fixes all your problems“
    Since then I never hovered over a red line again! 😉

  • @SoilentGr33n
    @SoilentGr33n 4 роки тому

    The newer videos with no music are much better, but this is still very useful.

  • @Rabipelao
    @Rabipelao 4 роки тому

    Used to write and read from files with iostream (I still believe is more efficient ajaja) but your solution is faster. I would suggest to use a try catch instead of just letting the trows IOException on the function tho. Great work!

  • @livy5x281
    @livy5x281 2 роки тому

    Thank you, sir! You saved my mid-term🥺

  • @mattm32
    @mattm32 4 роки тому +2

    ALEX, u made my day. Thanks!!!!!

  • @littlekiwi8936
    @littlekiwi8936 3 роки тому

    i wish i could just borrow you for an hour or so, so i can get help with my assignmnet and have it explained so much better and have all my questions awnsered

  • @avinash538
    @avinash538 4 роки тому

    You are a really awesome teacher.

  • @WOLF91
    @WOLF91 5 років тому +3

    Thank you, great vid. How do you go about counting each word on a text file?

    • @alexlorenlee
      @alexlorenlee  5 років тому +3

      Jairo Poveda you would do scan.next() until the end of the file, then add up all the times you used scan.next(). That might work for you

  • @Useroelas97
    @Useroelas97 3 роки тому

    Thank you for this great video.
    In my case i have ellipsis caracter (...) in the line.
    Line in file: aaaaa...bbbbbb
    But with scan.nextLine():
    Line1: aaaaa
    Line2: bbbbbbb

  • @mgtv6921
    @mgtv6921 3 роки тому

    Thank you, I was struggling with my Computer Science assignment. Appreciate the quick tip!👍🏾

  • @Brandon-qr8zz
    @Brandon-qr8zz 4 роки тому

    Thank you very helpful for my AP Computer Science class

  • @azabujubangaijin6607
    @azabujubangaijin6607 4 роки тому

    I continue to learn more from your videos than my professors. Great job! Any chance of showing out to save/print data input from a user? For example, user inputs request which is scanned against an array, then when done, prints a summary of what the user scanned.

  • @nikhil2453
    @nikhil2453 2 роки тому

    dude thank you so much you are incredibly helpful

  • @vinodterry2212
    @vinodterry2212 4 роки тому

    Thanks a lot buddy u helped me complete a micro java project Today

  • @squiddywiddy153
    @squiddywiddy153 3 роки тому

    hi! i don’t know if you’ll see this but i’ve always wondered what keyboard you have? the switches sound AMAZING and the style looks really nice so i was wondering if it was custom or something along those lines as i’m trying to pick out parts for a custom keyboard…. Your tutorials are great and even though you stopped doing them they still help me to this day! :)

  • @trantrungnghia9642
    @trantrungnghia9642 2 роки тому

    man ur body language just explains everything

  • @_Juicy
    @_Juicy 4 роки тому

    you are really a very good tutor!!! keep it up. God bless you!!!

  • @PunjabiKush
    @PunjabiKush 3 роки тому

    Not what I was looking for but this was helpful

  • @learntolead6250
    @learntolead6250 4 роки тому

    Thank you❣❣ so much bro... Lots love from india 🇮🇳

  • @alee4904
    @alee4904 5 років тому +3

    would this be the same as reading intergers?

  • @azhar8406
    @azhar8406 4 роки тому +1

    This video is amazing.
    Subscribed

  • @yoteapoyo
    @yoteapoyo 2 роки тому

    Simple is beautiful! Thanks!

  • @Vasanth251180
    @Vasanth251180 4 роки тому

    Hi Alex , any video or suggestion on, reading a string from a txt file and converting to a static string.

  • @theclan6607
    @theclan6607 2 роки тому +1

    Love your vibe

  • @Mas1o8
    @Mas1o8 4 роки тому

    the best, I'm learning more from you than my prof's.

  • @christinashumpert2265
    @christinashumpert2265 3 роки тому

    Alex! can you do a video on how to input a string to look for a name in a system?

  • @muhammadarslanbhatti2139
    @muhammadarslanbhatti2139 5 років тому

    Love this channel. Please keep on making new content

  • @Joshua-rk7bl
    @Joshua-rk7bl 3 роки тому

    My dawg came through for me yet again! Thanks Alex!

  • @whimsicalvibes
    @whimsicalvibes 5 років тому +1

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

  • @رند-س5ح
    @رند-س5ح 2 роки тому

    Thank you, you always help me, I am so grateful

  • @chronicallyonlineroza
    @chronicallyonlineroza 4 роки тому

    THANK YOU IT WORKEDDDD FINALLY AFTER HOURS OF RESEARCH