๐ŸŒ
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.
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_ref_string.asp
Java String Reference
The String class has a set of built-in methods that you can use on strings.
Discussions

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
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
help with basic java strings

I highly suggest looking up String's [split() method](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String). First step, run split to get your String[], then loop through with your length criteria.

More on reddit.com
๐ŸŒ r/java
15
0
October 29, 2013
Character to readable String
There is no existing function. I wrote something like this before for strings (named after the similar PHP function ). Might be useful to you: public static String addcslashes(String s) { int len = s.length(); StringBuilder sb = new StringBuilder(len); for (int i = 0; i < len; i++) { char c = s.charAt(i); switch (c) { case '\\': sb.append('\\').append('\\'); break; case '\n': sb.append('\\').append('n'); break; case '\r': sb.append('\\').append('r'); break; case '\0': sb.append('\\').append('0'); break; case '\"': sb.append('\\').append('"'); break; default: sb.append(c); } } return sb.toString(); } More on reddit.com
๐ŸŒ r/java
30
3
June 15, 2012
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_syntax.asp
Java Syntax
Strings Concatenation Numbers and Strings Special Characters Code Challenge Java Math Java Booleans
๐ŸŒ
Programiz
programiz.com โ€บ java-programming โ€บ string
Java String (With Examples)
Since strings are represented by double quotes, the compiler will treat "This is the " as the string. Hence, the above code will cause an error. To solve this issue, we use the escape character \ in Java.
๐ŸŒ
W3Schools
w3schoolsua.github.io โ€บ java โ€บ java_strings_en.html
Java Strings. Lessons for beginners. W3Schools in English
Java Strings. String Length. String Methods. Finding a Character in a String. Complete String Reference. Examples. Exercises. Lessons for beginners. W3Schools in English
๐ŸŒ
W3schools
w3schools.dev โ€บ java โ€บ java_strings.asp
Java Strings
A String in Java is actually an object, which contain methods that can perform certain operations on strings.
๐ŸŒ
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.
๐ŸŒ
W3Schools
w3schoolsua.github.io โ€บ java โ€บ java_ref_string_en.html
Java String Methods. Lessons for beginners. W3Schools in English
All String Methods in Java. The String class has a set of built-in methods that you can use on strings. Lessons for beginners. W3Schools in English
Find elsewhere
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ ref_string_format.asp
Java String format() Method
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 ... String myStr = "Hello %s!
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ java โ€บ strings-in-java
Java Strings - GeeksforGeeks
Explanation: The program creates a String object containing "Geeks" using the new keyword and prints it using System.out.println(). ... To make Java more memory efficient (because no new objects are created if it exists already in the string constant pool). Java stores string literals in the String Pool.
Published: 6 days ago
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ ref_string_substring.asp
Java String substring() Method
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 substring() method returns a substring from the string.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ java โ€บ java_strings.htm
Java - String Class
As with any other object, you can create String objects by using the new keyword and a constructor. The String class has 11 constructors that allow you to provide the initial value of the string using different sources, such as an array of ...
๐ŸŒ
Edureka
edureka.co โ€บ blog โ€บ java-string
Java Strings - How to Declare String in Java With Examples
February 13, 2025 - A string is an object that represents a sequence of characters. Read this article and know how to declare string in Java with examples.
๐ŸŒ
Netlify
w3schools.netlify.app โ€บ learnjava โ€บ java_ref_string
Java String Methods
abstract boolean break byte case catch char class continue default do double else enum extends final finally float for if implements import instanceof int interface long new package private protected public return short static super switch this throw throws try void while Java String Methods Java Math Methods ... The String class has a set of built-in methods that you can use on strings. ... W3School is optimized for learning, testing, and training.
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_strings_specchars.asp
Java Strings - Special Characters
Because strings must be written within quotes, Java will misunderstand this string, and generate an error.
๐ŸŒ
BeginnersBook
beginnersbook.com โ€บ 2013 โ€บ 12 โ€บ java-strings
Java โ€“ String Class and Methods with examples
String is a sequence of characters, for e.g. โ€œHelloโ€ is a string of 5 characters. In java, string is an immutable object which means it is constant and can cannot be changed once it is created.
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ ref_string_tostring.asp
Java String toString() Method
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 toString() method returns the string itself.
๐ŸŒ
DataFlair
data-flair.training โ€บ blogs โ€บ java-string-methods-and-constructor
Java String (Methods & Constructor) with Syntax and Example - DataFlair
May 18, 2026 - The strings in Java are a collection of characters bound by double quotes(โ€œโ€). They are immutable, i.e., once they are declared, their values cannot be changed. String can also be listed as an array of characters starting at the index 0 ...
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ java-string
Java String | DigitalOcean
Technical tutorials, Q&A, events โ€” This is an inclusive place where developers can find or lend support and discover new ways to contribute to the community.