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.
I think I wasted my damn time on W3Schools.
If it helps you then it wasn't a waste of time. I'm a full time full stack dev and find that W3 often puts things into layman's terms that I may otherwise be having a hard time understanding More on reddit.com
Am I the only person who thinks W3schools isn't a great resource to learn?
I think people who know the basics and go to w3 to refresh stuff recommend it but they themselves didn't learn it there. More on reddit.com
How does Java's substring method work? #java #computerscience #apcsa ...
08:05
Java substrings are easy! ๐ง - YouTube
substring And length (Java String Methods) - YouTube
Java Substring
01:11
How can you get a substring from a String? Cracking the Java Coding ...
02:06
Java String Methods Explained: length(), charAt(), substring() ...
W3Schools
w3schools.com โบ jsref โบ jsref_substring.asp
JavaScript String substring() Method
The substring() method extracts characters, between two indices (positions), from a string, and returns the substring. The substring() method extracts characters from start to end (exclusive).
W3Resource
w3resource.com โบ java-tutorial โบ string โบ string_substring.php
Java String: substring Method - w3resource
String new_str = str.substring(10, 26); System.out.println(); // Display the two strings for comparison. System.out.println("old = " + str); System.out.println("new = " + new_str); System.out.println(); } } ... IndexOutOfBoundsException - if beginIndex is negative or larger than the length of this String object. ... Exception in thread "main" java.lang.StringIndexOutOfBo undsException: String index out of range: -10 at java.lang.String.substring(String.java:1960) at Exercise.main(Exercise.java:9)
Codecademy
codecademy.com โบ docs โบ java โบ strings โบ .substring()
Java | Strings | .substring() | Codecademy
April 28, 2025 - Returns a part of the string specified through a starting index and an optional ending index.
Programiz
programiz.com โบ java-programming โบ library โบ string โบ substring
Java String substring()
System.out.println(str1.substring(0, ... substring() method returns a substring from the given string. The substring begins with the character at the startIndex and extends to the character at index endIndex - 1...
Tutorialspoint
tutorialspoint.com โบ java โบ java_string_substring.htm
Java - String substring() Method
This method has two variants and returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string or up to endIndex 1, if the second argument is given.
Home and Learn
homeandlearn.co.uk โบ java โบ substring.html
java for complete beginners - substring
To get the first characters, we had a 0 and a 2 between the round brackets of substring. You might think that to get the "Ga" of "Gates" that we could just do this: ... We still want two characters, after all. Only this time, the 5 would tell Java to start from the "G" of "Gates". (The first position in a string is position 0 not position 1.) So, start at position 5 in the string and grab 2 characters.
BeginnersBook
beginnersbook.com โบ 2013 โบ 12 โบ java-string-substring-method-example
Java String substring() Method with examples
As its explained above the example , โchaitanyaโ.substring(2,5) and the result is โa(2)i(3)t(4)โ, so the fifth character isnโt taken ? ... also count space ,secondly 20 end at โsโ,so java show less one character.so result is jump. Example: abc 012 (0,1) show just a exclusive end point.
Javatpoint
javatpoint.com โบ java-string-substring
Java String substring()
Java String substring() method with method signature and examples of concat, compare, touppercase, tolowercase, trim, length, equals, split, string substring in java etc.
How to do in Java
howtodoinjava.com โบ home โบ string โบ java string substring()
Java String substring() with Examples - HowToDoInJava
January 10, 2023 - Assertions.assertThrows(IndexOutOfBoundsException.class, () -> { //invalid index str.substring(-1); }); Assertions.assertThrows(IndexOutOfBoundsException.class, () -> { //begin index > end index str.substring(6, 4); }); In this short Java tutorial, we learned to get the substring of a specified string using the begin and end indices.
Upgrad
upgrad.com โบ home โบ tutorials โบ software & tech โบ substring in java
Substring in Java โ Syntax, Examples & Usage Explained
May 14, 2025 - It helps you manipulate text by extracting specific parts of strings. By understanding how it works, its syntax, and common use cases, you can avoid common pitfalls like index errors and use it more effectively in your Java programs.