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

Conteúdo do Curso

Java Extended

Java Extended

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

book
Challenge: Uppercase Even Words

Tarefa
test

Swipe to show code editor

Your task is to convert each word at an even position to uppercase and return the modified string.

  1. Split the input string into an array of words.
  2. Create a StringBuilder to build the resulting string.
  3. Loop through each word in the array using its index.
  4. For each word, check if its index is even.
  5. If the index is even, convert the word to uppercase and append it to the result string.
  6. If the index is odd, append the word as is.
  7. Return the final string after processing all words.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 3
toggle bottom row

book
Challenge: Uppercase Even Words

Tarefa
test

Swipe to show code editor

Your task is to convert each word at an even position to uppercase and return the modified string.

  1. Split the input string into an array of words.
  2. Create a StringBuilder to build the resulting string.
  3. Loop through each word in the array using its index.
  4. For each word, check if its index is even.
  5. If the index is even, convert the word to uppercase and append it to the result string.
  6. If the index is odd, append the word as is.
  7. Return the final string after processing all words.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 3
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt