Category: Java Tutorials

java objectstreamfield

Java ObjectStreamField Class

An explanation from a Serializable class regarding a Serializable field. A class’s Serializable fields are declared using an array of ObjectStreamFields. Explanation The Java Object Stream field class describes a serializable field from a...

java chararraywriter

Java CharArrayWriter Class

The Java.io.CharArrayWriter class implements a character buffer that can be used as a Writer. Data written to the stream automatically expands the buffer. Explanation The CharArrayWriter class is a subclass of the Writer abstract...

java string valueOf()

Java String valueOf() Method

The java string valueOf() function transforms various value types into strings. Using the string valueOf() method, we can convert int to string, long to string, boolean to string, character to string, float to string,...

java String toLowerCase()

Java String toLowerCase() Method with Examples

When all the letters in a string need to be changed to lowercase, the Java String toLowerCase() method is utilized. Using the locale’s guidelines, the characters are converted to lowercase. A string is changed...

java sequenceinputstream

Java SequenceInputStream Class with Examples

Sequence As sources, InputStream accepts two or more InputStream objects. It reads from one source after another in the order specified. When it has finished reading from the first InputStream, it will automatically begin...

java string join()

Java String join() Method with Examples

The join() method requires two inputs. Elements: the items that need to be linked together delimiter – the delimiter Any class that implements CharSequence may be sent to join(). If one is passed, the elements...

java printwriter

Java PrintWriter Class with Examples

Java PrintWriter class is the implementation of Writer class. It is used to print the formatted representation of objects to the text-output stream. PrintWriter is a class used to write any form of data,...

java outputstreamwriter

Java OutputStreamWriter Class

OutputStreamWriter is a Bridge between character streams and byte streams: the characters written for it can be decoded into bits using your specified code set. When you are required to write text data into...

java stringbuilder class

StringBuilder Class in Java with Examples

Mutable (modifiable) Strings can be created using the Java StringBuilder class. With the exception of being non-synchronized, the Java StringBuilder class is identical to the StringBuffer class. It has been accessible since JDK 1.5....

java string isempty()

Java String isEmpty() Method with Examples

The “isEmpty” function is a method commonly used in programming languages to check whether a string is empty or not. It returns a boolean value, typically “true” if the string has no characters (i.e.,...