🌐
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
🌐
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.
🌐
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
🌐
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
🌐
Software Testing Help
softwaretestinghelp.com › home › java › java string methods tutorial with examples
Java String Methods Tutorial With Examples
April 1, 2025 - Given below is the program that will demonstrate how the charAt() method retrieves a particular character from the given String. In this program, we have taken a String called “java string API” and we will try to retrieve the characters present at different indexes.
Find elsewhere
🌐
Programming Line
learn.programmingline.com › home › java string methods
Java String Methods: Full Guide with Examples
July 18, 2026 - Learn Java String methods in depth: length, substring, indexOf, split, replace, comparison, StringBuilder, common mistakes, and best practices.
🌐
ScholarHat
scholarhat.com › home › tutorials › java › what is string in java - ..
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
🌐
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.
🌐
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.
🌐
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
🌐
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.
🌐
Programiz
programiz.com › java-programming › string
Java String (With Examples)
January 31, 2024 - We can join two strings in Java using the concat() method.
🌐
Netlify
w3schools.netlify.app › learnjava › java_ref_string
Java String Methods
The String class has a set of built-in methods that you can use on strings.
🌐
DEV Community
dev.to › devcorner › string-in-java-a-comprehensive-guide-with-all-methods-46a
String in Java: A Comprehensive Guide with All Methods - DEV Community
March 26, 2025 - String s = "Java"; s.concat(" Programming"); System.out.println(s); // Output: Java (Not modified) To modify, use StringBuilder or StringBuffer. ... StringBuilder sb = new StringBuilder("Hello"); sb.append(" World"); System.out.println(sb); // Output: Hello World · This guide covered all String methods with examples.
🌐
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.
🌐
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().
🌐
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.