Last updated: Feb 22, 2022

Strings

String is a sequence of characters, For example: "hello" is a string containing a sequence of characters 'h' , 'e' , 'l' , 'l' , and 'o' . We use double quotes to represent a string in Java.In java, string is an immutable object which means it is constant and can not be changed once it has been created.
Why String is Immutable in Java? EASY
Java makes String immutable to preserve data integrity, allowing safer sharing of strings across threads and reducing the risk of unintended changes.
String Comparison EASY
Learn how to compare strings in Java using equals(), compareTo(), and == with syntax, examples, and key differences for effective string comparison.
String Concatenation in Java EASY
Learn different approaches for string concatenation in Java, including syntax, examples, and performance tips for using +, StringBuilder, and StringBuffer.
String Class Methods EASY
This blog contains the string class methods of the java programming language. Various examples are presented in the blog to explain the concept in detail.
Strings vs StringBuffer EASY
This blog explains the differences between String and StringBuffer, as well as a performance test to see how long they take to execute.
How to Convert String to Long in Java EASY
This article will explain the different methods to accomplish this conversion. We'll learn this conversion using different methods like the parseLong() method, the valueOf() method, and the constructor of the Long class.
Convert String to Array in Java EASY
In this article, we'll discuss different methods of converting a string to an array in Java. We'll explain how to use the toCharArray() method, split() method, StringTokenizer class and manually convert each character.
Occurrence of Character in String in Java EASY
We will discuss how to count the occurrence of a character in a string in Java with simple code examples and an optimized solution.
Difference between Comparing string using == and .equals() Method in Java EASY
Learn the difference between == and .equals() in Java for string comparison with examples. Understand when to use each for accurate Java coding.
Generate Random String in Java EASY
In this article, we will learn how to generate a random string in Java using methods like `UUID`, `Random`, `SecureRandom`, and `Apache Commons Lang`.
How to Convert String to Json Object in Java EASY
Learn how to convert a string to a JSON object in Java with this step-by-step guide. Easy examples and solutions for beginners and developers.
Append() Method in Java StringBuilder & StringBuffer MEDIUM
Java append() method in StringBuilder & StringBuffer: Learn efficient string manipulation, usage, and examples for faster coding.
StringBuffer Class
Learn about StringBuffer in Java for thread-safe, mutable string handling. Discover methods, advantages, features and examples of Stringbuffer class in Java.
Difference between StringBuffer and StringBuilder Class EASY
Explore the difference between StringBuffer and StringBuilder in Java with examples, focusing on performance, thread safety, and best use cases.
StringBuilder Class in Java EASY
Discover the StringBuilder class in Java, its syntax, constructors, and methods. This article provides detailed examples to enhance your understanding of StringBuilder in Java.
How to Sort Strings in Java EASY
This article briefs about the methods used for sorting strings in Java using the built-in and custom sort techniques. Understand the meaning of Java sort string with FAQs.
String Arrays in Java EASY
Learn how to declare, initialize, and use String arrays in Java with simple syntax, practical examples, and tips for accessing and managing string data.
StringTokenizer in Java EASY
StringTokenizer in Java breaks strings into tokens using delimiters. Learn how it works, its usage, and why String.split() is now preferred.
StringUtils IsEmpty EASY
This article will discuss the IsEmpty method of StringUtils class. We will learn to use the IsEmpty method to check if a CharSequence is empty or null.
Convert String to Boolean in Java MEDIUM
String to Boolean in Java & JavaScript explained with examples. Learn simple ways to convert strings to boolean values for efficient coding.
Special String Operations in Java EASY
This article explains all the special string operations in Java String class with the help of various examples and programs.
How to convert String to Float in Java? EASY
In this article, learn how to convert string to float in Java and float to string in Java with examples.
Author Manshi
0 upvotes
Strings in Java EASY
Learn Java Strings with examples. Explore String, StringBuffer & StringBuilder classes and understand how to create and manipulate strings efficiently.

String Methods in Java

Java has a lot of String methods that allow us to work with strings.Here you will find all the string methods available in Java.
String charAt() in Java EASY
Explore the Java String charAt() method with syntax, examples, and how to access a character at a specific index in a string.
Author Aditi
0 upvotes
Java String compareTo() Method EASY
Learn how Java's compareTo() method works in the String class with detailed examples. Understand string comparison logic in Java for sorting and matching.
Author Aditi
0 upvotes
Java String contains() Method EASY
Learn how Java contains() method checks if a string contains a specific sequence of characters. Includes syntax, usage, and return values.
String endsWith()
In this article, we will learn about the concept of the string endsWith() method in java with the help of code examples.
String equals() in Java EASY
String equals() in Java – Learn how equals() compares string values, its syntax, examples, and difference from == operator for accurate string comparison.
Java String equalsIgnoreCase() Method EASY
The equalsIgnoreCase() method in Java is used to compare two strings, ignoring case differences. In this article we will learn Java equalsIgnoreCase() in detail.
Java String format() EASY
Learn how the String.format() method in Java formats strings with variables, numbers, and text for clean, readable, and dynamic output.
String Manipulation in Java EASY
String manipulation in Java refers to the process of modifying or working with strings, which are sequences of characters.
String getBytes() in Java EASY
This blog will be containing a detailed discussion on the String getChars() method in Java Programming. We will be learning its syntax, parameters, and return type with the help of an example.
Java String getChars() Method EASY
This blog will be containing a detailed discussion on the String getChars() method in Java Programming. We will be learning its syntax, parameters, and return type with the help of an example.
Java String indexOf() EASY
The indexOf() method in Java returns the index of the first occurrence of a specified character or substring in a string. It returns -1 if not found.
Java String intern() Method EASY
This blog will be containing a detailed discussion on the String intern() method in Java Programming. We will be learning its syntax, working, parameters, and return type with the help of an example.
String isEmpty() EASY
This blog will demonstrate the functioning of the isEmpty() function of Strings along with the examples.
String Join() EASY
This blog offers a detailed guide on understanding the Join() method of the String class in Java programming languages, with examples. To know more about it, read on!
String lastIndexOf() EASY
This blog demonstrates the use of String lastIndexOf() function in Java with examples.
Java String Length() Method EASY
Learn about Java String length() method with syntax, parameters, and examples. Understand how to use string length() in Java effectively.
String replace( ) Method in Java MEDIUM
Learn how to use the String replace() method in Java to replace characters or substrings in a string with new values. Simple syntax and examples included
Author
0 upvotes
String replace( ) EASY
In this article, we will discuss the String replace method in java, its syntax, and implementation, and we will see some examples.
Java String replaceAll() Method Explained
Java String replaceAll() explained with syntax, examples, and use cases to replace characters or patterns in strings efficiently. Learn now.
String split() in Java
Learn how to use the String split() method in Java to divide a string into substrings based on a specified delimiter with examples and syntax.
String startsWith() Method in Java MEDIUM
Java startsWith() method checks if a string begins with a specific prefix and returns a boolean value. Learn syntax, usage, and examples.
String substring() in Java EASY
Learn how to use the String substring() method in Java to extract parts of a string by specifying start and end indexes with practical examples.
String toCharArray() in Java
Learn how String toCharArray() in Java converts a string into a character array, enabling easy manipulation, iteration, and string processing.
Java String toLowerCase() Method Explained MEDIUM
Java String toLowerCase() method converts characters to lowercase and returns a new string. Learn syntax, examples, and usage in detail.
String toUpperCase()
This blog gives a complete demonstration of String toUpperCase() function in Java with examples.
Java String trim() Method
In this article, we will learn about the Java String trim() Method and how to use it. We will also see some examples to understand this method's working properly.
String valueOf() in Java with Examples EASY
Java String.valueOf() method converts data types to String representation. Learn syntax, usage, and examples for better Java programming.
What is String Args[] in Java? EASY
After completing this article, you will master the string args in Java. We will discuss the need and examples of string args in Java.