0% found this document useful (0 votes)
31 views

Java String Methods

This document provides an overview of common Java String methods including length() to return the character count, charAt(n) to return the character at a specific index, indexOf(d) to return the index of the first occurrence of a character, substring(a, b) to return a substring from index a to b, and substring(c) to return a substring from index c to the end.

Uploaded by

salmanshokha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Java String Methods

This document provides an overview of common Java String methods including length() to return the character count, charAt(n) to return the character at a specific index, indexOf(d) to return the index of the first occurrence of a character, substring(a, b) to return a substring from index a to b, and substring(c) to return a substring from index c to the end.

Uploaded by

salmanshokha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Reference: Java String Methods

length() returns the number of characters in a String


charAt(n) returns the character at index n
indexOf(d) returns the index of the first occurrence of d in the String
substring(a, b) returns the sequence of characters at index a up to b
substring(c) returns the sequence of characters from index c through the Strings end

You might also like