🌐
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.
🌐
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 ...
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
403K subscribers in the java community. News, Technical discussions, research papers and assorted things of interest related… 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: May 30, 2026
🌐
W3Schools
w3schools.com › java › java_strings.asp
Java Strings
A String in Java is actually an object, which means it contains methods that can perform certain operations on strings.
🌐
BeginnersBook
beginnersbook.com › 2013 › 12 › java-strings
Java – String Class and Methods with examples
public boolean isEmpty(): This method returns true if the given string has 0 length. If the length of the specified Java String is non-zero then it returns false.
🌐
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.
🌐
Codecademy
codecademy.com › learn › spring-apis-java-ii › modules › learn-java-string-methods › cheatsheet
Java II: String Methods Cheatsheet | Codecademy
This method returns a String representing the text of the combined strings. ... In Java, the equals() string method tests for equality between two Strings.
🌐
Software Testing Help
softwaretestinghelp.com › home › java › java string methods tutorial with examples
Java String Methods Tutorial With Examples
April 1, 2025 - This tutorial explains different methods associated with the Java String class. Each method is explained with description, syntax & examples.
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
🌐
Medium
medium.com › @sunil17bbmp › 15-essential-java-string-methods-every-developer-must-know-2e814f5d77f6
15 Essential Java String Methods Every Developer Must Know | by Code With Sunil | Code Smarter, not harder | Medium
February 23, 2026 - Java provides many built-in String methods that make it easy to perform common operations such as concatenation, comparison, searching, and manipulation.
🌐
Javatpoint
javatpoint.com › java-string
What is String - javatpoint
Java String class with methods such as concat, compareTo, split, join, replace, trim, length, intern, equals, comparison, substring operation.
🌐
Tutorialspoint
tutorialspoint.com › java › java_strings.htm
Java - String Class
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.
🌐
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.
🌐
Crio
crio.do › blog › string-methods-in-java
10 Important String Methods In Java You Must Know
October 20, 2022 - Useful and important methods in Java. indexOf, toCharArray, charAt, concat, replace, substring, split, compareTo, strip, valueOf
🌐
Codecademy
codecademy.com › learn › learn-java › modules › learn-java-string-methods › cheatsheet
Learn Java: String Methods Cheatsheet | Codecademy
This method returns a String representing the text of the combined strings. ... In Java, the equals() string method tests for equality between two Strings.
🌐
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 - String class and its methods in Java java.lang.String is the most used class in Java. It’s important to understand and be able to manipulate strings fluently. String Class String Methods Comparing …
🌐
WsCube Tech
wscubetech.com › resources › java › string-methods
Java String Methods (Functions): Full List With Examples
July 25, 2026 - Learn Java String Methods (Functions) with examples. Understand its syntax, uses, and tips to manipulate strings effectively for Java programming. Read More!
🌐
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 implementation of the String class in Java uses a char array to store the sequence of characters. Operations like concatenation and substring involve creating new String objects, but the original string remains unchanged due to immutability.
🌐
Medium
medium.com › @dhanushahasheel › string-methods-in-java-83a601f5b2ef
String Methods in JAVA. - by Dhanusha Hasheel
November 6, 2025 - String Methods in JAVA · Java provides a variety of built-in features for the String class to help us implement and analyze strings effectively and efficiently. · The following string methods are …
🌐
DataCamp
datacamp.com › doc › java › java-strings
Java Strings
Strings can be created in Java using string literals or by instantiating the String class. ... Java provides a robust set of methods to perform various operations on strings.