Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAditya Puri
1,080 PointsI don't quite get it...
The concept is vaguely explained here....what exactly are InputStreams and OutputStreams? And why are we putting them in a try-catch block? Please help..
Also, earlier I could do around 10 exercises/videos per day on treehouse...but now they are getting complicated(and at the same time less clear) and I can only do 1 per day unless I rush on and don't understand them completely.
Is this normal?
1 Answer
Ethan Weeks
15,352 PointsI don't think I could explain it any better than this article. JavaIO <- This site is a wealth of information. To answer why we are using a try/catch is because the methods associated with reading and writing throw exceptions when they occur an error. If a exception is thrown while running some block of code the exception will propagate back to main and terminate the program. That's why we get the sequence of method calls that lead to the exception, we call it a stack trace. To handle errors accordingly we catch those exceptions inside the catch block. Once caught we can handle it however we feel fit and the program can continue executing.
Yes, it is completely normal. Treehouse's material is dense and the concepts you are introduced to here have a lot of depth to them. I bet if we graphed out Treehouse user's points earned we'd see a roller coaster effect from the start of a course/track to the end. Hmm app ideas...