🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › String.html
String (Java Platform SE 8 )
July 21, 2026 - The class String includes methods for examining individual characters of the sequence, for comparing strings, for searching strings, for extracting substrings, and for creating a copy of a string with all characters translated to uppercase or to lowercase. Case mapping is based on the Unicode Standard version specified by the Character class. The Java language provides special support for the string concatenation operator ( + ), and for conversion of other objects to strings.
🌐
Java Guides
javaguides.net › 2018 › 08 › string-programs-in-java-with-output.html
String Programs in Java with Output
August 9, 2023 - That’s why String programs are used in Java interviews to access coding skills. Here is a list of String Programs with output. The source code from these String programs was well-tested in our development environment. We have used JDK 8 or later to develop these programs.
🌐
Java8
java8.info › apicontents › string.html
Java 8 - The String Class
Lets look at some code to illustrate the above scenario and prove that the str1 and str2 reference variables point to the same object, so that we can see the reuse of strings in the string constant pool: package info.java8; /* String immutability and the String Constant Pool */ import static java.lang.Math.acos; public class TestString { public static void main(String[] args) { String str1 = "java"; System.out.println("str1 = " + str1); str1 = "tutor"; System.out.println("str1 = " + str1); str1 = "javatutor"; String str2 = "javatutor"; System.out.println("str1 = " + str1); System.out.println("str2 = " + str2); System.out.println(str1 == str2); } }
🌐
BeginnersBook
beginnersbook.com › 2013 › 12 › java-strings
Java – String Class and Methods with examples
Program to find duplicate characters in a String · Convert char to String and vice versa · Convert a char array to String · String to Date conversion · Date to String conversion · ASCII to String conversion · float to String conversion · StackTrace to String conversion · Writer to String conversion · Convert String to ArrayList · Java 8 – StringJoiner Example ·
🌐
Oracle
docs.oracle.com › javase › tutorial › java › data › strings.html
Strings (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)
String palindrome = "Dot saw I was Tod"; int len = palindrome.length(); A palindrome is a word or sentence that is symmetric—it is spelled the same forward and backward, ignoring case and punctuation. Here is a short and inefficient program to reverse a palindrome string.
🌐
GroTechMinds
grotechminds.com › home › strings problems in java
Strings Problems in Java
July 26, 2024 - Some of the string methods are concat()which joins two or more given strings, length() to find the length of the given string, trim() to remove the spaces in the beginning and ending of the string and charAt() to find out the letter present at the index position of the String. Below are some of the string programs and their solutions which are important from an interview perspective.
Address: 1st Floor, Hesaraghatta Main Road, Bangalore North, Near Bone Mill Bus Stop, Opposite Kruthika Hospital, Bangalore, Karnataka, 560090
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-string-programs
Java String Programs - GeeksforGeeks
October 7, 2025 - Strings are widely used for storing and processing textual data in programs. Here is a complete list of Java String practice programs divided into basic and advanced categories:
🌐
Programiz
programiz.com › java-programming › string
Java String (With Examples)
And all string variables are instances of the String class. Java provides various string methods to perform different 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.
Find elsewhere
🌐
Tutorialspoint
tutorialspoint.com › java › java_strings.htm
Java - String Class
The Java platform provides the String class to create and manipulate strings. The most direct way to create a string is to write − ... Whenever it encounters a string literal in your code, the compiler creates a String object with its value ...
🌐
w3resource
w3resource.com › java-exercises › string › index.php
Java exercises: String Exercises - w3resource
March 2, 2026 - Write a Java program to find the length of the longest substring of a given string without repeating characters. ... Input String : pickoutthelongestsubstring The longest substring : [u, b, s, t, r, i, n, g] The longest Substring Length : 8
🌐
GitHub
github.com › openjdk › jdk › blob › master › src › java.base › share › classes › java › lang › String.java
jdk/src/java.base/share/classes/java/lang/String.java at master · openjdk/jdk
import sun.nio.cs.UTF_8; · /** * The {@code String} class represents character strings. All · * string literals in Java programs, such as {@code "abc"}, are · * implemented as instances of this class. * <p> * Strings are immutable; their values cannot be changed after they ·
Author: openjdk
🌐
DigitalOcean
digitalocean.com › community › tutorials › string-programs-in-java
String Programs in Java | DigitalOcean
August 4, 2022 - The most important point to understand is how Strings get created in java. When we create a String using string literal, it doesn’t change the value of original String. It creates a new String in the string pool and change the reference of the variable. So original string value is never changed and that’s why Strings are immutable. Below program proofs our statement, read out the comments for proper understanding the concept.
🌐
Dev.java
dev.java › learn › numbers-strings › strings
Strings - Dev.java
Creating strings of characters, exploring the String class to manipulate strings.
🌐
Smartprogramming
smartprogramming.in › tutorials › java › string-programs
Java String Programs | String Logical Questions
Easy Level Programs · 6 WAP to add characters to a String · 7 WAP to insert one String into another String · 8 WAP to count the number of words in a String · 9 WAP to compare two Strings · 10 WAP to compare two Strings lexicographically · 11 WAP to convert String to String Array ·
🌐
GeeksforGeeks
geeksforgeeks.org › java › strings-in-java
Java Strings - GeeksforGeeks
Each character in a string is stored using 16-bit Unicode (UTF-16) encoding. Strings are immutable, meaning their value cannot be changed after creation. Java provides a rich API for manipulation, comparison, and concatenation of strings.
Published: 1 week ago
🌐
GeeksforGeeks
geeksforgeeks.org › java › string-class-in-java
String Class in Java - GeeksforGeeks
April 23, 2026 - The String class in Java represents a sequence of characters and is widely used for handling textual data. It provides various methods for creating, comparing, and manipulating strings.
🌐
GitHub
github.com › imavipatel › String-Programs
GitHub - imavipatel/String-Programs: All Programs related to String In Java · GitHub
All Programs related to String In Java. Contribute to imavipatel/String-Programs development by creating an account on GitHub.
Author: imavipatel
🌐
W3Schools
w3schools.com › java › java_strings.asp
Java Strings
For a complete reference of String methods, go to our Java String Methods Reference. The reference contains descriptions and examples of all string methods. ... Coding fundamentals as a game. Bite-sized lessons and challenges. ... Ready to start your journey? Your streak is waiting. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com