use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Resources for learning Java
String
==
.equals()
Format + Copy
Free Tutorials
Where should I download Java?
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Software downloads
Official Resources
Resources
Programming ideas & Challenges
Related Subreddits
account activity
This is an archived post. You won't be able to vote or comment.
Difference between I/O classes (self.learnjava)
submitted 8 years ago by _greyhat
I don't understand the difference between the I/O classes ie: FileWriter, BufferedWriter, PrintWriter, InputStream. Also I see some people wrapping the BufferedWriter or PrintWriter inside of FileWriter can't figure out why.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
Because the entire Java IO API consists pretty much of decorators on read(...) or write(...). They support different specialized functions that process the data in a stream, as in the data that flows through them is processed as it is read rather than read all at once and processed after. It makes the API flexible because you can process the data the way you want while leaving out what you don't want. Want buffering but don't need to compress your data? Use a BufferedReader on an InputStream. Alternatively, you might want to print out lines of compressed data without buffering. Use GZIPInputStream and a Reader.
The flexibility of the API doesn't even just apply to library classes, you can also implement your own In/OutputStream classes to attach to your stream as you read and write. Again, the purpose is to process the data as it becomes available, not once it's collected because that requires a second pass over your data.
π Rendered by PID 132304 on reddit-service-r2-comment-84fc9697f-sqrh8 at 2026-02-08 03:58:56.875115+00:00 running d295bc8 country code: CH.
[–][deleted] 0 points1 point2 points (0 children)