Hello guys, welcome back to the next one. In this one, I'll discuss one more exercise with you, this is kind of an homework for you. And also it's a very common interpretation, especially if you are looking in testing quill. So, let me just bring up the document. So, assume that you have a string and the string is it is a test string, you need to write a code to reverse the characters of the string. And and we have previously seen one program similar I have discussed that but there was reverse the string word by word.
So, the reverse string output is something like this, if the input string is it is a string, the output would be string test is it so which means we are just reversing the order of the words in the string right? But in this program, you need to do something like this reverse characters output. So you need to do each and every character should be So if d was at the end, it should come at the first end was the second last. Now it became the second, right? So it's exactly completely reversed. It says, just match it from this one.
This is just an example I showed you to differentiate this has nothing to do in this lecture, but match it with this one. Do you say them and then i r t, s, and then same thing is with test t s, t is a single letter, so it's going to be same as i, t and capitalized. So each and every character should be reversed. Again, we'll utilize lots of things like if conditions for loops and string fundamentals. And always try to make sure that you do checks for invalid and null strings, empty strings to tell the user that this is not a valid string, or tell them method from where it's getting called. One thing optional is please stop To see if you can use the scanner class.
This is the class provided by Java. And it helps us to take the input from the user. So instead of just providing it from the main method, we can take the input from the user, but this is just optional. If you don't know about it, it's okay. In the next lecture, I will discuss the solution and I will go over everything. So for now, just try to work on it guys.
And let me know when you have any questions, and try to see the solution in the next lecture. Thanks for ending this one. Thanks.