0 Bewertungen0% fanden dieses Dokument nützlich (0 Abstimmungen)
64 Ansichten2 Seiten
The document contains examples of using various string methods in Java like substring, concat, compareTo, indexOf, equals, etc. to manipulate and compare strings. Some key examples include:
1. Using substring and concat to join parts of two strings.
2. Using substring to extract parts of a string and compare strings.
3. Using compareTo to compare strings alphabetically and get their relative ordering.
4. Using indexOf to find the index of a character in a string.
5. Using equals to check if two strings are equal.
6. Using replace to replace all occurrences of a character in a string.
The document contains examples of using various string methods in Java like substring, concat, compareTo, indexOf, equals, etc. to manipulate and compare strings. Some key examples include:
1. Using substring and concat to join parts of two strings.
2. Using substring to extract parts of a string and compare strings.
3. Using compareTo to compare strings alphabetically and get their relative ordering.
4. Using indexOf to find the index of a character in a string.
5. Using equals to check if two strings are equal.
6. Using replace to replace all occurrences of a character in a string.
The document contains examples of using various string methods in Java like substring, concat, compareTo, indexOf, equals, etc. to manipulate and compare strings. Some key examples include:
1. Using substring and concat to join parts of two strings.
2. Using substring to extract parts of a string and compare strings.
3. Using compareTo to compare strings alphabetically and get their relative ordering.
4. Using indexOf to find the index of a character in a string.
5. Using equals to check if two strings are equal.
6. Using replace to replace all occurrences of a character in a string.