October 2017
Beginner
318 pages
7h 26m
English
To confirm that we're all on the same page, let's employ one more method from the String class. If we head back to our documentation and scroll up, we can find the String's replace() method:

Unlike our toUpperCase() method, which took no arguments, replace() takes two characters as arguments. The function will return a new string where all the instances of the first character (oldChar) we give as an argument are replaced with the second character (newChar) we gave as an argument.
Let's utilize this function on our first println() line in StringsInJava.java. We'll type s3.replace() and give our function two characters ...
Read now
Unlock full access