Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Character Indices Sum Challenge | String Advanced
Java Extended
course content

Course Content

Java Extended

Java Extended

1. Deep Java Structure
2. Methods
3. String Advanced
4. Classes
5. Classes Advanced

bookCharacter Indices Sum Challenge

Task

Write a method that finds the indices of the first and last occurrence of a character in a string and returns their sum. Keep in mind that some letters may be in uppercase, so convert the string to lowercase beforehand.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 5
toggle bottom row

bookCharacter Indices Sum Challenge

Task

Write a method that finds the indices of the first and last occurrence of a character in a string and returns their sum. Keep in mind that some letters may be in uppercase, so convert the string to lowercase beforehand.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 5
toggle bottom row

bookCharacter Indices Sum Challenge

Task

Write a method that finds the indices of the first and last occurrence of a character in a string and returns their sum. Keep in mind that some letters may be in uppercase, so convert the string to lowercase beforehand.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Task

Write a method that finds the indices of the first and last occurrence of a character in a string and returns their sum. Keep in mind that some letters may be in uppercase, so convert the string to lowercase beforehand.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 3. Chapter 5
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt