Tagged: Core Java

CharArrayWriter class

CharArrayWriter Class in java

In the previous post, we have seen BufferedInputStream and BufferedOutputStream. In this post, we will CharArrayWriter class. This class writes characters to a writer and converts those written characters into a char arary. CharArrayWriter...

BufferedInputStream and BufferedOutputStream

BufferedInputStream and BufferedOutputStream in java

In the previous post, we have seen FileInputStream and FileOutputStream. In this post, we will look at BufferedInputStream and BufferedOutputStream in java. Let’s start with BufferedOutputStream class. BufferedOutputStream class: BufferedOutputStream class uses an internal buffer...

FileInputStream and FileOutputStream in java

FileInputStream and FileOutputStream in java

In the previous post, We have seen FileReader which is used to read the data from text file. In this post, we will look at FileInputStream and FileOutputStream in java. These classes are used...

Filereader in java

FileReader in java

In previous post, we have seen FileWriter. In this post, we will see how to read data from a text file with the help of  FileReader in java. FileReader is a  character based classe unlike FileInputStream which is used for reading byte based...

Filewriter in java

FileWriter in java

In previous post, we have seen InputStream and OutputStream. In this post, we will see how to write data to a text file with the help of  FileWriter in java. FileWriter is a  character based classes unlike FileOutputStream which is used...

InputStream and OutputStream in java

InputStream and OutputStream in java

In this post , we will look at what is InputStream and OutputStream in java? In the previous post, we have seen I/O overview.Let’s understand them one by one. InputStream class: This is a...

IO in java

I/O in java

Java I/O is an API which is used to read and write data (Input and Output) and it is located in package called java.io.The Java IO package is primarily focused on input and output...

Different ways to reverse the string

Different ways to reverse String in java

There can be different ways to reverse the String. Here , we are mentioning few. Let’s understand them with example. 1. We can reverse the string by using a for loop and method charAt....

StringBuilder in java

StringBuilder in java

StringBuilder in java is like a String ,but which can be modified. It is same as StringBuffer, but only difference is that it is non-synchronized. The length of the String and content of sequence can...

StringBuffer class in java

StringBuffer class in java

StringBuffer class in java is like a String ,but which can be modified. The length of the String and content of sequence can be changed by using StringBuffer methods. It can be implemented in following...