🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › String.html
String (Java Platform SE 8 )
July 21, 2026 - 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 ...
🌐
W3Schools
w3schools.com › java › java_ref_string.asp
Java String Methods
close() delimiter() findInLine() findWithinHorizon() hasNext() hasNextBoolean() hasNextByte() hasNextDouble() hasNextFloat() hasNextInt() hasNextLine() hasNextLong() hasNextShort() locale() next() nextBoolean() nextByte() nextDouble() nextFloat() nextInt() nextLine() nextLong() nextShort() radix() reset() useDelimiter() useLocale() useRadix() Java File Methods Java FileInputStream Java FileOutputStream Java BufferedReader Java BufferedWriter Java Iterator Methods Java Collections Methods Java System Methods Java Errors & Exceptions · Java Examples Java Videos Java Compiler Java Exercises Java Quiz Java Code Challenges Java Practice Problems Java Server Java Syllabus Java Study Plan Java Interview Q&A ... The String class has a set of built-in methods that you can use on strings.
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
October 6, 2018
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
May 3, 2018
New Methods on Java Strings With JDK 11
JDK 11 will probably be bringing a few new methods to the String class! Most of them focus on redefining white space for a… More on reddit.com
🌐 r/java
74
110
May 3, 2018
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-string-methods
Java String Methods - GeeksforGeeks
Java String methods are built-in functions provided by the String class to perform various operations on strings. These methods help in manipulating, comparing, searching, and formatting text efficiently.
Published: September 28, 2026
🌐
YouTube
youtube.com › watch
Useful string methods in Java! 🧵 - YouTube
#java #javatutorial #javacourse public class Main { public static void main(String[] args) { String name = "Bro Code"; int length = name.len
Published: December 5, 2024
🌐
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
🌐
Tutorialspoint
tutorialspoint.com › java › java_strings.htm
Java - String Class
One accessor method that you can use with strings is the length() method, which returns the number of characters contained in the string object.
Find elsewhere
🌐
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
🌐
DEV Community
dev.to › arshisaxena26 › strings-basic-methods-in-java-interview-essentials-1k99
Strings: Basic Methods in Java-Interview Essentials - DEV Community
January 10, 2025 - This is a common interview question to test your understanding of string manipulation and case-insensitivity in Java. The startsWith() method is case-sensitive by default, so to perform a case-insensitive check, you need to standardize both the string and the substring to the same case using toLowerCase() or toUpperCase().
🌐
YouTube
youtube.com › watch
Java String methods 💬 - YouTube
Java String methods tutorial explained#java #string #methodspublic class Main { public static void main(String[] args) { // String = a reference data type...
Published: October 19, 2020
🌐
Medium
beknazarsuranchiyev.medium.com › string-class-and-its-methods-in-java-147b7aedc3a9
String class and its methods in Java | by Beknazar | Medium
June 15, 2022 - The string is the final class and we cannot extend the final classes. The methods provided by the String class can be used to manipulate its value.
🌐
Oracle
docs.oracle.com › en › java › javase › 21 › docs › › api › java.base › java › lang › String.html
String (Java SE 21 & JDK 21)
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.
🌐
Medium
medium.com › @salvipriya97 › commonly-used-string-functions-in-java-343543b06132
Commonly used String functions in Java | by Priya Salvi | Medium
January 3, 2024 - The String class in Java is part of the java.lang package and represents a sequence of characters. Strings in Java are immutable, meaning their values cannot be changed once they are created. The String class provides various methods for manipulating and extracting information from strings.
🌐
DataFlair
data-flair.training › blogs › java-string-methods-and-constructor
Java String (Methods & Constructor) with Syntax and Example - DataFlair
May 18, 2026 - Direct conversion of byte array DataFlair Conversion of byte array by specified character set DataFlair Using character set and offset indexes ata Using character array DataFlair Using character array and start index ata Unicode conversion ataF The string builder initialization DataFlair Using Stringbuilder initialization Java · 1. length: This method is particularly useful for finding out 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.
🌐
Oracle
docs.oracle.com › en › java › javase › 17 › docs › api › java.base › java › lang › String.html
String (Java SE 17 & JDK 17)
April 21, 2026 - Returns a string whose value is this string, with escape sequences translated as if in a string literal. ... This method does not translate Unicode escapes such as "\u2022". Unicode escapes are translated by the Java compiler when reading input characters and are not part of the string literal specification.
🌐
Particlesin
particlesin.com › course › java-built-in-methods
Java String Methods – Introduction & Commonly Used Methods
We're sorry but particles-in doesn't work properly without JavaScript enabled. Please enable it to continue
🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › lang › String.html
String (Java SE 11 & JDK 11 )
January 20, 2026 - Constructs a new String by decoding the specified subarray of bytes using the specified charset. The length of the new String is a function of the charset, and hence may not be equal to the length of the subarray. This method always replaces malformed-input and unmappable-character sequences with this charset's default replacement string.
🌐
Codecademy
codecademy.com › learn › learn-java › modules › learn-java-string-methods › cheatsheet
Learn Java: String Methods Cheatsheet | Codecademy
In Java, the indexOf() string method returns the first occurence of a character or a substring in a String.
🌐
Great Learning
mygreatlearning.com › blog › it/software development › string methods java: a guide to java strings with examples
String Methods Java: A Guide To Java Strings With Examples
October 24, 2024 - static String valueOf(int value)- It is an overloaded method to convert the given type into a string. Let us check some examples of string functions in Java.