🌐
Baeldung
baeldung.com › home › java › java string › get substring from string in java
Get Substring from String in Java | Baeldung
July 21, 2024 - For more details on the Java regular expressions check out this tutorial. We can use the split method from the String class to extract a substring. Say we want to extract the first sentence from the example String.
🌐
IONOS
ionos.com › digital guide › websites › web development › java substrings
How to use the Java substring method - IONOS
January 6, 2025 - If you want to extract a specific subset from the larger string, you have several options. The method Java String.split() breaks an entire string down into its in­di­vid­ual parts to, for example, give you a clearer overview of the string. The method substring() takes that one step further and returns only the part of the string that you define.
Discussions

java - Call to 'substring' is redundant - Stack Overflow
I've created simple code to reverse an equation, but two lines are highlighted by lint in IntelliJ IDEA. Exact message is Call to 'substring' is redundant final String equation = "20+3*475-2-1*4"; More on stackoverflow.com
🌐 stackoverflow.com
IntelliJ IDEA, Jetbrains' Java IDE
The title pretty much says it all. This is a subreddit for posting discussion, tips & tricks, asking for help, etc. with Jetbrains' absolutely awesome IntelliJ IDEA IDE. More on reddit.com
🌐 r/IntelliJIDEA
May 6, 2025
IntelliJ IDEA 2024.2 users - update your IDE
The IDEA update notes for 2024.2.0.2 from inside the IDE lists "various updates and fixes", which some folks might choose not to apply. The actual release notes say: This update brings an important fix to an issue that is under NDA. ``` Some folks have reported issues with TypeScript projects, see comments below. More on reddit.com
🌐 r/java
37
71
August 23, 2024
IntelliJ IDEA 13.1 is painfully slow

You could try asking on r/IntelliJIDEA (shameless plug).

Have you tried building your project in Eclipse or directly with javac from Command Prompt? It might not be IDEA's fault, and it doesn't sound like it would be.

Check your project settings for extra dependencies that might have gotten imported accidentally.

Java compilation is definitely I/O bound. If your hard drive is slow or you need to search for and load in a lot of JARs, then it's going to drive up your build time. It could be simply that you need to defragment your hard drive.

More on reddit.com
🌐 r/java
19
1
July 12, 2014
🌐
Igmguru
igmguru.com › home › blog › java › substring in java
Java String substring() Method: A Complete Guide
2 weeks ago - Java provides two types of substring() methods to extract parts of a string using indexes. Understanding these two variations helps in choosing the correct method for different string manipulation needs. This method returns part of a string starting from the given index to the end. It ignores all characters before the index and keeps everything after it. ... Index count: P(0) r(1) o(2) g(3)...
🌐
DigitalOcean
digitalocean.com › community › tutorials › java-string-substring
Master Java Substring Method: Examples, Syntax, and Use Cases | DigitalOcean
February 20, 2025 - Learn how to use the Java substring method. Explore syntax, practical examples, and common errors to handle substrings effectively.
🌐
GeeksforGeeks
geeksforgeeks.org › java › substring-in-java
Java String substring() Method - GeeksforGeeks
April 11, 2025 - In Java, the substring() method of the String class returns a substring from the given string. This method is most useful when you deal with text manipulation, parsing, or data extraction.
🌐
DEV Community
dev.to › satyam_gupta_0d1ff2152dcc › master-java-substring-a-no-fluff-guide-with-examples-real-world-use-25e7
Master Java substring(): A No-Fluff Guide with Examples & Real-World Use - DEV Community
November 25, 2025 - In the simplest terms, substring() is a built-in method of the Java String class that returns a brand new string which is a part of the original string. Think of it as a digital scalpel for your text.
Find elsewhere
🌐
CodeGym
codegym.cc › java blog › strings in java › substring in java
Java String substring()
July 23, 2024 - Java Substring in general is a contiguous sequence of characters inside the String. It could be a part of the String or the whole String as well. What is substring in Java? This language has a substring() method, or rather two methods, thanks to Java method overloading.
🌐
HappyCoders
happycoders.eu › home › java › java substring() method: how to use it and how it works
Java substring() Method: How to Use It and How It Works
1 month ago - Two details were added: If a UTF-16 string contains a substring consisting only of Latin-1 characters, substring() creates that substring compactly, with one byte per character. And an empty section of a non-empty string is always the literal "". I wrote a small program to demonstrate the changes of the substring() method over the Java versions.
🌐
Software Testing Help
softwaretestinghelp.com › home › java › java substring() method – tutorial with examples
Java substring() Method - Tutorial With Examples
April 1, 2025 - Scenario 1: What will be the output of the substring method when the specified index is not present in the main String? Explanation: In this scenario, we are going to take an input String “Java Programming” and we will try to specify the index as 255 and 350 for the starting and ending indexes respectively.
🌐
Tutorial Gateway
tutorialgateway.org › java-substring-method
Java substring
August 9, 2026 - public String substring(int Starting_index); // It will return Integer //In order to use in program Str_Object.substring(int Startig_index) The following method will accept the integer value, the starting index position (Starting_index), where the extraction will start as the first parameter. Furthermore, it allows the last index position (End_index), where the sentence will end as the second argument. The Java String method will return the substring starting from the Starting_index to End_index.
🌐
Simplilearn
simplilearn.com › home › resources › software development › all you should know about substring in java
All You Should Know About Substring in Java | Simplilearn
September 11, 2025 - 3. Deleting the first character : Strings in Java start at index 0, i.e., the first character is 0 indexed. If you need to remove the first character, use substring(1).
Address: 5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
BeginnersBook
beginnersbook.com › 2013 › 12 › java-string-substring-method-example
Java String substring() Method with examples
str.substring(1): This excludes first character as the index 0 character (first character) is excluded.
🌐
TechVidvan
techvidvan.com › tutorials › substring-in-java
Substring in Java - TechVidvan
April 4, 2024 - The substring extends from the character at the given index to the last character of the string. The substring’s endindex starts at 1, not 0. Java the built-in substring() function of the String class allows one to extract a substring from a given string using index values that are specified as arguments.
🌐
Codecademy
codecademy.com › docs › java › strings › .substring()
Java | Strings | .substring() | Codecademy
April 28, 2025 - The .substring() method in Java returns a portion of a string from a specified starting index to an (optional) ending index.
🌐
Hero Vired
herovired.com › learning-hub › blogs › java-substring
Substring in Java: How to Use the Function [Code Examples]
When the second argument is already given, its substring starts with its element at its startIndex to endIndex -1. Syntax : public String substring(int startIndex, int endIndex) Parameters: startIndex: the starting index, inclusive ... Return Value: Specified substring. Substring is the string manipulation function, which manipulates string data types (such as BLOB, BIT, and CHARACTER). In addition, it extracts characters from one string and creates another. Want to learn about the types of inheritance in Java?
🌐
Edureka
edureka.co › blog › substring-in-java
Substring in Java | String substring() Method Example | Edureka
June 14, 2021 - This method has two variants and it returns a new string which is a substring of this string. The substring begins with a character at the specified index BeginIndex and extends to the end of the string or up to endIndex – 1 if another argument ...
🌐
GitHub
github.com › JetBrains › intellij-community › blob › master › platform › util › src › com › intellij › openapi › util › text › StringUtil.java
intellij-community/platform/util/src/com/intellij/openapi/util/text/StringUtil.java at master · JetBrains/intellij-community · GitHub
return text.length() > maxLength ? text.substring(0, maxLength) + (appendEllipsis ? "..." : "") : text; ... public static @NotNull CharSequence first(@NotNull CharSequence text, int length, boolean appendEllipsis) { ... public static @NotNull CharSequence last(@NotNull CharSequence text, int length, boolean prependEllipsis) { ... ? text.subSequence(0, length / 2) + ELLIPSIS + text.subSequence(text.length() - length / 2 - 1, text.length())
Author: JetBrains