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

Kurssisisältö

Java Extended

Java Extended

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

book
Challenge: Uppercase Even Words

Tehtävä

Swipe to start coding

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.

Ratkaisu

java

solution

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 3
toggle bottom row

book
Challenge: Uppercase Even Words

Tehtävä

Swipe to start coding

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.

Ratkaisu

java

solution

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 3
Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?
some-alt