Java String

Java StringBuffer Class

In this tutorial you will learn about Java StringBuffer class and its important methods with examples. StringBuffer in Java is used to create mutable strings. Here mutable means, we can modify or change the strings. StringBuffer class is thread safe which means multiple threads can’t access the same object simultaneously. Apart from StringBuffer, we can …

Java StringBuffer Class Read More »

Java String Comparison

String class in Java provides different methods for comparing strings or substrings within strings. In this tutorial I will discuss about those Java string comparison methods.   equals() and equalsIgnoreCase() We can use equals() method to check equality of two strings. It has following syntax. Syntax   Here str is the String object and equals() …

Java String Comparison Read More »

String in Java

String in Java is a sequence of characters. In other programming languages like C and C++, string is implemented as array of characters while in Java string is implemented as object of String class. String class is defined in java.lang package. StringBuffer and StringBuilder class is also used to create string in Java. We will …

String in Java Read More »