Category: Java Tutorials

java string replace()

Java String replace() Method

The replace() method searches for a given character in a string and returns a new string where the given characters are replaced. In this method, a new string is returned when new ones replace...

string concantenation in java

Java String concat() Method with Examples

The concatenation function in Java makes a new string composed of multiple strings. There are two ways of combining strings in Java: The +string operator is used. Use the concat() method. String Concatenation by...

java string charat ()

Java String charAt() Method

We are going to discuss the String charAt() function in Java. The Java String returns the character in a string at the given position charAt(int index) function. The index value should fall between 0...

java throws keyword

Java Throws Keyword with Examples

In Java, the throws keyword indicates that a method might throw one or more exceptions during its execution. It’s an important part of exception handling and is particularly relevant for checked exceptions, which are...

java dataoutputstream

Java DataOutputStream Class

Java is a wide range and used efficiently for many purposes. DataOutputStream Classes are used in various applications of Java. It shows various methods for the data output of Stream. Explanation The Java DataOutputStream...

java datainputstream

Java DataInputStream Class

To read raw data bytes from images, audio, video, etc., utilise an input stream. The FileReader class allows for reading character streams, which can also be read using character-stream data. Explanation An application can...

java filteroutputstream

Java FilteroutputStream Class

With versions that pass all requests to the underlying output stream, the FilterOutputStream class simply overrides all methods of OutputStream. Some of these methods can be further manipulated by FilterOutputStream’s subclasses, including providing other...

java String trim()

Java String trim() Method

A builtin function that eliminates leading and trailing spaces is the trim function of Java String. A space character’s Unicode value is “u0020”. Before or after a string, this Unicode value is checked by...

java filterinputstream

Java FilterInputStream Class

The InputStream is implemented by the Java FilterInputStream class. To provide extra functionality, it has various subclasses like DataInputStream and BufferedInputStream. So, its individual use is declining. Explanation The Java FilterInputStream class functions similarly...

java objectstream

Java ObjectStream Class with Examples

Object streams, like data streams, allow for the I/O of primitive data types. Most, but not all, standard classes enable their objects to be serialized. Those that do implement the Serializable marker interface. ObjectInputStream...