Solution Review: Finding the Right Words
In this review, the solution of the challenge 'Finding the Right Words' from the previous lesson is provided.
We'll cover the following...
Solution: did you find the right words? #
Press + to interact
class HelloWorld {public static void main( String args[] ) {String text = " Names! Doe ";String answer = "";answer = text.trim();answer = answer.substring(0, 6);answer = answer.toUpperCase();System.out.println(answer);}}
Understanding the solution
The first step is to analyze the given ...