๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_ref_string.asp
Java String Methods
assert abstract boolean break byte case catch char class continue default do double else enum exports extends final finally float for if implements import instanceof int interface long module native new package private protected public return requires short static super switch synchronized this throw throws transient try var void volatile while Java String Methods
๐ŸŒ
DEV Community
dev.to โ€บ pankaj_singhr โ€บ 10-most-useful-string-methods-in-java-4lag
๐ŸŽฏ 10 most useful string methods in Java - DEV Community
January 19, 2022 - 1 - indexOf() used to find characters and substrings in a string. It returns the index of first occurrence from left of the passed string or character syntax - public int indexOfโ€‹(String str, int fromIndex) str - substring to be search fromIndex - search begin from this index
Discussions

Java String Methods - You Need To Know

First method of the article is charAt... Great start! Then you realise this is probably every method available order alphabetically... This could be reduce to a "5 methods to know" to be really interesting.

More on reddit.com
๐ŸŒ r/programming
1
0
May 21, 2015
ELI5:What is a "String" in Java/programming and why is it known as a "complex added type" and other variable are known as "primitive" ?
In simplest terms, a String is an collection (referred to in programming as an "array") of characters. If you wanted to have a String that said "Reddit", it would literally be an array of character values ['R', 'e', 'd', 'd', 'i', 't']. The most fundamental difference between strings and primitive types such as "int" are that primitives are single values. Strings are collections of values (specifically, a collection of characters.) Characters themselves are primitive types. In addition, primitive types are pieces of data. Strings are objects, which are instances of classes. As far as classes go...basically, the people who made Java built a lot of code so Strings could be easy to use by programmers. (This is also why "String" is capitalized: the name of the class has a capital S.) Sorry if this is too technical...but it should answer your questions. More on reddit.com
๐ŸŒ r/explainlikeimfive
5
1
November 21, 2015
New Methods on Java Strings With JDK 11

Looks like they're taking the awful PHP "real_escape_string" approach to API development of finding increasingly strained synonyms when something needs to be fixed by making the Unicode-aware version of String.trim() be named String.strip() instead of just adding an overload for trim() that takes an option parameter to specify the trimming type.

A hypothetical alternative of trim(StringTrimOptions options), used as in these examples:

// First two are equivalent, and use the backward-compatible
// pre-existing trimming logic
str.trim();
str.trim(StringTrimOptions.ASCII_WHITESPACE);

// This example uses new Unicode-compatible trimming logic.
str.trim(StringTrimOptions.UNICODE_WHITESPACE);

... would be a much better solution that wouldn't require every developer going forward, in perpetuity, to have to discover what the non-obvious difference between trim() and strip() is (whereas the hypothetical StringTrimOptions alternative is self-explanatory to a large extent); and is forward-compatible should the need ever arise in the future for yet another type of string trimming.

(And with the isBlank() method being added too, which could probably also benefit from being able to specify the type of whitespace; maybe instead of StringSplitOptions the argument should be WhitespaceType instead so an overload ofisBlank() could read correctly with it too.)

More on reddit.com
๐ŸŒ r/programming
16
30
December 10, 2014
New Methods on Java Strings With JDK 11
Maybe one day they will even add string padding utils to the stdlib. More on reddit.com
๐ŸŒ r/java
74
110
May 3, 2018
๐ŸŒ
Oracle
docs.oracle.com โ€บ javase โ€บ 8 โ€บ docs โ€บ api โ€บ java โ€บ lang โ€บ String.html
String (Java Platform SE 8 )
October 20, 2025 - The Java language provides special support for the string concatenation operator ( + ), and for conversion of other objects to strings. String concatenation is implemented through the StringBuilder(or StringBuffer) class and its append method. String conversions are implemented through the ...
๐ŸŒ
Refreshjava
refreshjava.com โ€บ java โ€บ string-class-methods
Useful String Class Methods in Java with Example - RefreshJava
Java string class methods are used to perform operations on string variables or string literals like compare two strings, find or replace a character/word in a string, add two strings etc.
๐ŸŒ
Quizlet
quizlet.com โ€บ 711022570 โ€บ java-string-methods-flash-cards
Java String Methods Flashcards | Quizlet
The Java platform provides the String class to create and manipulate strings example: String word = "dog"; Method ยท A Java method is a collection of statements that are grouped together to perform an operation ยท
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ home โ€บ java/lang โ€บ java string class
Java String Class
September 1, 2008 - Note โˆ’ The String class is immutable, so that once it is created a String object cannot be changed. If there is a necessity to make a lot of modifications to Strings of characters, then you should use String Buffer & String Builder Classes. Methods used to obtain information about an object are known as accessor methods.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ java โ€บ java-string-methods
Java String Methods - GeeksforGeeks
October 11, 2025 - Java provides a rich set of String methods that help perform various operations like comparison, searching, modification of string.
Find elsewhere
๐ŸŒ
Tutorial Gateway
tutorialgateway.org โ€บ java-string-methods
Java String methods
March 28, 2025 - The String Methods perform string comparison, search, copy, extracting substring, and converting to lowercase or uppercase. The following table shows the list of Java Methods or functions available in the String Class
๐ŸŒ
ScholarHat
scholarhat.com โ€บ home
What is String in Java - Java String Methods & Type (Examples)
Strings are immutable, meaning once created, their values cannot be changed. Java provides powerful built-in methods for string manipulation, such as concatenation, comparison, substring extraction, and pattern matching.
Published ย  August 30, 2025
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ java-string
Java String | DigitalOcean
August 3, 2022 - Letโ€™s have a look at some of the popular String class methods with an example program. Java String split() method is used to split the string using given expression.
๐ŸŒ
Programiz
programiz.com โ€บ java-programming โ€บ string
Java String (With Examples)
Java provides various string methods to perform different operations on strings.
๐ŸŒ
Medium
medium.com โ€บ @AlexanderObregon โ€บ java-and-string-manipulation-what-beginners-need-to-know-81f971c77539
Java and String Manipulation โ€” What Beginners Need to Know
June 15, 2024 - Java provides several methods to perform basic string operations that every beginner should know. These operations include concatenation, finding the length of a string, and extracting characters from a string.
๐ŸŒ
Medium
medium.com โ€บ @AlexanderObregon โ€บ a-beginners-guide-to-java-strings-3485cba0b517
Java Strings Guide For Beginners | Medium
February 23, 2024 - Each string object contains a sequence of characters, but the way Java manages these objects under the hood is what sets it apart. For instance, consider the string declaration below: ... Here, hello is not just a mere array of characters; it's an instance of the String class, and as such, it comes with all the functionalities that the class offers, such as methods for string manipulation, comparison, and searching.
๐ŸŒ
DataFlair
data-flair.training โ€บ blogs โ€บ java-string-methods-with-examples
Java String Methods with Examples - DataFlair
November 25, 2024 - Use StringBuilder for Efficient String Manipulation: Methods like substring() and concat() return new string instances. For repeated string manipulations, StringBuilder is preferred over manual concatenation. The Java String class provides rich methods and properties for working with strings.
๐ŸŒ
Scaler
scaler.com โ€บ topics โ€บ java โ€บ string-in-java
String in Java (With Examples) - Scaler Topics
May 10, 2022 - Now we are going to see some more examples of string in Java. In the above-given examples, val1 is created using the string literal, val2 is created using the new keyword and val3 is created by concatenating/joining val1 and val2. The length() method of string in Java is used to get the length of the string.
๐ŸŒ
Programiz
programiz.com โ€บ java-programming โ€บ library โ€บ string
Java String Methods | Programiz
Java has a lot of String methods that allow us to work with strings. In this reference page, you will find all the string methods available in Java.
๐ŸŒ
WsCube Tech
wscubetech.com โ€บ resources โ€บ java โ€บ string-methods
Java String Methods (Functions): Full List With Examples
September 2, 2025 - Learn Java String Methods (Functions) with examples. Understand its syntax, uses, and tips to manipulate strings effectively for Java programming. Read More!
๐ŸŒ
BeginnersBook
beginnersbook.com โ€บ 2013 โ€บ 12 โ€บ java-strings
Java โ€“ String Class and Methods with examples
public static String join(): This method joins the given strings using the specified delimiter and returns the concatenated Java String
๐ŸŒ
Oracle
docs.oracle.com โ€บ en โ€บ java โ€บ javase โ€บ 17 โ€บ docs โ€บ api โ€บ java.base โ€บ java โ€บ lang โ€บ String.html
String (Java SE 17 & JDK 17)
January 20, 2026 - The Collator class provides methods for finer-grain, locale-sensitive String comparison. ... The implementation of the string concatenation operator is left to the discretion of a Java compiler, as long as the compiler ultimately conforms to The Java Language Specification.
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ String
String - JavaScript | MDN
String literals (denoted by double or single quotes) and strings returned from String calls in a non-constructor context (that is, called without using the new keyword) are primitive strings. In contexts where a method is to be invoked on a primitive string or a property lookup occurs, JavaScript ...