This is the first time i feel like i'm understanding everything in a coding tutorial. Your steps are so clear and you don't skip anything. You don't make anything complicated and show it as simple as it is. Perfect video. Thank you so much John, i hope you have a nice day!
@antunes6239 Жыл бұрын
YHEAA i'm from Brazil,and by the first time,i understood how this work
@dushanchanuka19416 ай бұрын
Same here🎉😅
@ErikHansenDrums3 жыл бұрын
really astounded that there aren't more clear cut tutorials/explanations about buffered reader/writer on YT. Thanks for the video!
@Jmarthecat2 жыл бұрын
You have no idea how happy I am when I search something related to Java and your video pops up.
@misaelpereira96793 жыл бұрын
For anyone that does not know, you can use "try with resources" instead of closing the buffered items (and everything that implements closeable interface)
@flameyosflow_4834 Жыл бұрын
In the latest java versions at least, you can only use try-with-resources when something implements AutoClosable
@illegalgiant_ Жыл бұрын
I've worked in this industry for years but as a lower level tech employee and am needing to brush up again. These tutorials are just fantastic. If you can understand why you'd do things this really clears up the rest. To boot, they are really concise and nicely made. Thanks man I do appreciate it.
@OmnispectiveHub2 жыл бұрын
Perfect video. I can't begin to explain to you the confusion college classes give when explaining this type of stuff. Its great to have you as a resource for learning what they lack to teach properly. Much thanks, John.
@shanisb952 жыл бұрын
Each time I am struggling with a notion on CodeGym I am on the lookout for one of your videos. And each time it gets crystal clear when you explain it. Thank you so much for your work !
@findlestick3 жыл бұрын
What? A concise, clearly-explained tutorial on KZbin? Subbed. 👍
@HolyApplebutter Жыл бұрын
You're an absolute god-send. I've been struggling with these last couple weeks of the semester, but you're able to explain these concepts so easily with clear examples to help walk us through them. You're great!
@hkkabir20243 жыл бұрын
thank you for your excellency. now i don't need to check anywhere for reading and writing file. Millions of thanks
@marksummers954311 ай бұрын
you just help me finish a whole assignment in two hour over 3 videos, i appreciate you
@limitless9483 Жыл бұрын
As a JS engineer after starting to learn JAVA I've been wondering why every JAVA tutorial is recoreded in 320p quality with shitty audio !!!! finally a java tutorial with JS tutorials standards lol thank you so much.
@turboheadcrab6662 жыл бұрын
This is the easiest way to understand the I/O. The university teacher and other youtubers make this a tedious topic, but you made it so much easier. Thanks a lot!
@lamiabakli35688 ай бұрын
watching this right before my OOP exam, you're a life saver
@dilln21583 жыл бұрын
Amazing, thank you for making this, very engaged with your viewers. This man is going places!
@konstantinzakharov5643 Жыл бұрын
I watched this video, wrote some code and it works, Now I can reaaly write to and read from a file. Finally I wrote something that works. Thanks John!
@oswaldovirto5896 Жыл бұрын
You always come in clutch John. I was taught how to do this a year ago and I haven't had to use it since but this was a great refresher. Thank you!
@dilln21583 жыл бұрын
This man is going places
@justinliu77882 жыл бұрын
You should close the resources in finally block or use a try with resources to guarantee the resources are closed. If you don't do this and there is some exception while running the writes, the resource will never be closed.
@WannaBeProgrammer2 жыл бұрын
This is the first educational video I have slowed down the playback speed because I want to get every detail possible.
@HelicopterRidesForCommunists2 жыл бұрын
Man, I keep finding great video lessons like this that do a better job of explaining and teaching than my own PROFESSORS do. It is fucked up how expensive College is for what we get out of it aside from "certification", essentially, and a way to officially show we have taken the courses.
@TherealShacharTs11 ай бұрын
We were given an assignment to code all kinds of shapes, and the lecturer deliberately did not teach how to save files. And I asked him why they don't teach, but they did put it in the assignment, he said he wants us to learn to code and think twice about how everything works, only after watching your video, I understood the meaning of why he wanted it, there won't always be someone next to you to tell you, this is the stage you need study alone and look for answers
@mastershonobi1103 жыл бұрын
Ok, this videos was awesome. Currently taking Udemy’s “Java Programming Master Class” it’s very in-depth…and I’m always looking for Channels/videos like your to fill in the gaps and give a different/simpler explanation on what seems to be complex topics. You should offer private lessons in addition to your Course. IMHO. 🙌🏿🙌🏿🙌🏿
@CodingWithJohn3 жыл бұрын
If I can figure out a good way to do that when I have time, that's certainly an idea!
@mastershonobi1103 жыл бұрын
@@CodingWithJohn I think it would be a very complimentary “course” for that course if nothing else. Just A Thought…. P.S. I will be visiting your other vids to reinforce and fill in the gaps in other topics/areas in Java. e.g “LinkedList” ans pointers lmao..
@DragonOfTheWest4123 жыл бұрын
@@mastershonobi110 hey I’m taking that same class.
@mastershonobi1103 жыл бұрын
@@DragonOfTheWest412 how far in are you???
@DragonOfTheWest4123 жыл бұрын
@@mastershonobi110 section 8 almost on 9 how about you ?
@AdamZX1 Жыл бұрын
Hey John, regarding the 'while' loop, I'd rather simply implement it using '.ready()' i.e.: while (reader.ready()) System.out.println(reader.readLine()); Which does exactly the same thing as your code. Thank you for the great content and best regards !
@poorpanda9033 Жыл бұрын
Woah! This is great. Thanks for sharing !!
@RealCasualTrash3 жыл бұрын
Amazing work man! Helps a lot for revising(Learning everything from scratch) for uni exmas! Keep it up!
@dasikalyan3 жыл бұрын
Yeah.. as someone pointed out.. try-with-resources is a good way to show best practice for any resource that implements closeable .. something like this try (BufferedWriter writer = new BufferedWriter(new FileWriter("output.txt"))) { writer.write("Writing to a file"); } catch (Exception e) { e.printStackTrace(); }
@moxy-1873 жыл бұрын
You make it so easy to understand, thank you!
@ouhyeap3152 жыл бұрын
When I see your videos feels like Java is too easy but when I go to actually programming my brain just reseted
@rajacharya1842 жыл бұрын
thanks man you are like a savior in the hard times almost makes me wanna cry
@nikhilsaimunagala22323 жыл бұрын
This video really helped me learn File Input/Output properly. Btw, does it matter whether we choose File or Buffer Reader & Writer?
@dewy36710 ай бұрын
Thanks alot! So much easier than reading a lecture note when you have such an in depth summary
@nelsoncoop37742 жыл бұрын
if you create a PrintWriter instead of BufferedReader it comes with the normal print statements (print, println, printf) which is much easier and more familiar
@Rosie-gj1pt Жыл бұрын
More clear than my teacher's explanation regarding Java IO! Thanks for the video so much❤
@jacobkurek53662 жыл бұрын
Thanks for the great video. I'm a freshman in college studying CS and videos like this really help me get my projects done on time.
@achellous8900 Жыл бұрын
A very beautiful and calm way of redirecting knowledge! Respect
@mbbthree Жыл бұрын
Thank you! I kept getting a blank output, just needed to close the writer. God bless!
@Another0neTime2 жыл бұрын
Thanks, John. This was clear, concise, and educational.
@kamui7424 Жыл бұрын
Thanks for this bro, beginner here, and this really helped me a lot.
@marlon4415 Жыл бұрын
Your way of explaining is very good. You kinda like go through the way of thinking, your explanation is in a very logical order. I'm very impressed, very good 👍🏻
@BlueIsLeet2 жыл бұрын
It's better to use try with resources because close() may not get called if the readLine() or write() throws an exception
@sararara72532 жыл бұрын
I heart you John! You make learning Java clear and understandable. Thank you for helping me learn more and drink less...(coffee). Cheers!
@asmewilliams71177 ай бұрын
At 2:30, actually the set is written on the fly even without the close() method being called. Edit: My bad, I used a Try With Resources, that's why I didn't need to call close() which is called automatically with TWR.
@takeover6056 Жыл бұрын
Thank you so much. You explain everything so easy and methodically. I am learning Java in Stockholm Sweden. Have a good evening!
@aye.myatmon4485 Жыл бұрын
Thank you! John . For being my compiler .
@johntravolta26552 жыл бұрын
I just can't stop watching you! Keep it going :)
@18kroger7 ай бұрын
You nailed it. A crystal clear explanation.
@tazorun3 жыл бұрын
정말 좋은 수업 매일 매일 듣고 있습니다. 감사합니다. SUper easy to study.
@AlexandreJasmin3 жыл бұрын
This would be a good place to use Java’s try-with-resources statement which automatically close the file when leaving a code block. For a small program like this, main() can also be declared as “void main(String[] args) throws IOException” which would end the program and print a stack trace in case of error.
@shantanupanditiitdelhi55152 жыл бұрын
Very fantastic sir, the you was explaining that show how much you are cleared about concepts, thanks again master !!
@zeppelinmexicano Жыл бұрын
It's good to have a "go to" set of objects/methods for this kind of work. I like the BufferedReader/Writer approach and if I'm not mistaken it will even scale up and allow an efficient job with larger data.
@InvinciRD Жыл бұрын
Pls upload more vdos as i cant afford to spend more online .... You are my only hope towards fun learning...pls make every type vdo related coding ... i will watch and learn them all..
@skotosei9948 Жыл бұрын
YOU ARE THE GOAT BRO TY, AM FRENCH STUDENT AND YOU HELP ME SO MUCH, love you
@aycayldran8248 Жыл бұрын
you explain the subject like it is very simple, then I open the examples that my teacher write, everything becomes hell again
@GourmetBytes Жыл бұрын
lol, shameless plug of your course at beginning.... I hear less than 3 min of you speak and now I'm looking at that course like it's a nicely made steak dinner! Fantastic content! Both java knowledge and ability to teach!!!
@priyanalpat2 жыл бұрын
I am a fan of your classes, simple and advanced. god job. Keep going
@abzzz-y7o Жыл бұрын
I have never seen a tutorial like this. Very cool
@kraxmalismАй бұрын
very good explanation. i wish real life scenarios were as easy
@lyn89642 жыл бұрын
oh, finally understood this topic, thanks! You are the best Java teacher!
@maroofraktim2935 ай бұрын
You're a gem. Keep going brother. Subbed.
@anushka.narsima2 жыл бұрын
Your videos are so clear and concise, tysm!
@sudheereddy61822 жыл бұрын
You are one of the best who made this reader and writer concept look so simple and I really appreciate you work and effort. Thank you !
@vidyar1572 Жыл бұрын
Very Helpful Video. Please do a video on Serialization and De-serialization in JAVA with relevant examples. Thanks
@snoopie512 жыл бұрын
Thanks for being very understandable and simple, I’ve been kinda struggling with this.
@bultibulti671611 ай бұрын
Can you please create a video to compare ip/Op .xls file with some transformation logic applied.
@mustafaturgut9930 Жыл бұрын
I like the way you make every topic in java easy to understand. Please do more java videos
@tanakamusungare65462 жыл бұрын
Thanks for making this concept much more understandable
@sintumavuya7495 Жыл бұрын
You were so clear and easy to understand. Thank you.
@blind1936 Жыл бұрын
Always used scanner for this sort of things, and when I first time saw this monstrosity of a code at algorythmic test, I was terrified. Thanks to your tutorial now I uderstand it is preatty useful and easy to use. Thanks a lot and keep up the good work.
@paulallen46223 жыл бұрын
John your videos are amazing and helping me so much with my studies in software development! Keep doing what you are doing!
@dinohunter71763 жыл бұрын
I love your videos, straight on point and easy to understand.
@Garrison862 жыл бұрын
thank you, that was super easy to follow
@boyneverstop2 жыл бұрын
This is very useful! Thank you for making this video!
@recipeFor2 жыл бұрын
Your videos are always needed. Thanks
@arthurdirnberger59462 жыл бұрын
First of all, this is a great video but I have a problem: how can I write to a File without deleting anithing that was in the file previosly?
@sheelaaprameya3432 жыл бұрын
Use this code. Pass output file name as well as "true" parameters for the file writer object. The true signifies boolean "append" = true. BufferedWriter writer = new BufferedWriter(new FileWriter ("Output.txt", true));
@madfilmer43492 жыл бұрын
Super method of teaching,able to understand hard concepts though..
@tinongsot62672 жыл бұрын
great job, u made it looks so simple!! love it
@darkojitsu Жыл бұрын
John, this is awesome! I really appreciate this tutorial.
@doniagasmi21922 жыл бұрын
you make everything clear and simple. Thank you!
@Bunjo0011 ай бұрын
You awesome man, that was super easy to follow!
@a1rman9065 ай бұрын
listen here u bastard. my professor has tried to teach it but couldnt make it that clear as u do it. u really are the goat.
@canhle39702 жыл бұрын
Thanks a lot, John. You're really my saver there on my way to master Java !!!
@LAZIO14 Жыл бұрын
I like ypu channel very much!!! You are my favorite englishspeaker youtube bloger, who makes Java Tutorials!!!
@vpenywise3 жыл бұрын
Liked, shared, subscribed, commented... Loving your content, thank you!
@parthsalat2 жыл бұрын
Every youtuber needs to know your location lol
@fumano2679 Жыл бұрын
quick question from someone who wants to learn with best practice in 7:55 you make a comparison and declaration in the same line, wouldnt it be 'better' to use a do while loop where you declare in the do scope and compare in the while condition? like: String line; do { line = reader.readLine(); } while (line != null) EDIT: i just saw that if line is null in my example it would still print it, so is the solution in the video best practice? i face those situations a lot where you have something you would like to declare in the loop but also need it as a condition to end the loop and giving it an initial value is kinda boilerplate code since you have the loop for this, would like to get someone else's opinion on that. Thanks
@arush55968 ай бұрын
felt like I understood a lot, but can you make a video about solving some mediocre level questions of file handling
@tamalmazumder84763 ай бұрын
Thanks...Have a nice day!!
@hassanlearning4086 Жыл бұрын
Thank you for creating such informative and helpful content. Your explanation of Java File Input/Output made a difference in understanding this complex concept. P.S. wrote/read the above comments from this lesson FileIO in Eclipse! Thanks
@larbesabdellah70796 ай бұрын
Why u didn't included the reader and writer inside parentheses within try block when creating it like this : try (FileWriter writer = new FileWriter(path){// code} , this way no need to close the obj it will be done automatically, same for the the reader
@DuderMcDudenstein2 жыл бұрын
Strangely, if, rather than declaring a String line which is then repeatedly reassigned as the value of the reader.readLine() method call, you instead just write: while (reader.readLine() != null) then it doesn't work correctly...
@simplestep54492 ай бұрын
but what if the text made of a lot of paragraphs and it needs an empty line whenever has a new paragraph, will the read code still works? anyway, great video, thanks sir John!
@raandomplayer85892 жыл бұрын
Watching this for advent of code. Thanks!
@raandomplayer85892 жыл бұрын
Update: I can't do it. 😢
@daviddean551223 күн бұрын
I understand the concept and how to use it but can someonentell when it would be used / implemented? I'm fairly new
@mr.schrodinger78 ай бұрын
diificult concepts seem very ease when they are taught by u
@bambuskrieger332 жыл бұрын
7:58 Does the reader automatically go to the next line while executing the while loop (cause otherwise the first line would be printed over and over again)? I'm asking because we didn't specifically tell it to do so
@janfeyen592 Жыл бұрын
clear, concise and honestly reminds me that Java can be easier to manage than C
@CodingWithJohn Жыл бұрын
It's been about 15 years since I've needed to code in C and I can't say I've missed it
@janfeyen592 Жыл бұрын
@@CodingWithJohn haha
@bibeksharma6003 жыл бұрын
Greatly explained....Need more contents ! :D
@FrojoMemes Жыл бұрын
I LOVE YOU CODING WITH JOHN!!!
@shahriarkazi902 жыл бұрын
Hey John, at 7:36 you showed a while loop. My question is that if there are 2 paragraphs, then wouldn't the reader just stop at the last line of the first paragraph and not further move on to the first line of the second paragraph?
@osmigtorres23333 ай бұрын
It reads the line until there is no more lines
@petrsehnal7990 Жыл бұрын
Super simple and helpful!
@areukiddinme84383 жыл бұрын
cant you throw an ioexception instead of a try catch ? also is it okay to use a hasNextLine in the while loop?