Course Content
Java Basics
Java Basics
Basic Methods In String Part 2














Putting Methods into Practice
Now, let's dive into code examples for each of these methods. You'll quickly grasp their functionality:
Main.java
We just used many methods on a single string, but in the end, its value remained unchanged. That's exactly what I mentioned in the previous section. The value of a string doesn't alter without creating a new object in memory.
Now, let's explore a few practical applications of these methods through the following example tasks:
Task 1
Display an array of characters containing the characters of a given string. First, convert each character to uppercase, and then print it on the screen.
Main.java
Task 2
Given a string that contains the word "helicopter," your task is to remove all the unnecessary letters from this string and display the new string on the screen, replacing all occurrences of the letter "e" with "u."
Main.java
You have observed that it's possible to use various methods simultaneously and how they will impact our string. I understand that the topic is quite intricate but highly significant. In the next chapter, you will tackle such a task independently and solidify your understanding through practical application.
What will be printed to the console?
Select the correct answer
What will be printed to the console?
Select the correct answer
What will be printed to the console?
Select the correct answer














Everything was clear?