Hello, in this Java programming video, we are going to look at characters. So we've taken a look at characters and the char datatype. Before in the datatype video, we're going to advance it a bit further and have a look at escape sequences, have a look at the different you know, Java methods that, you know, is provided to help manipulate characters as well. So let me have a quick look at escape sequences. So for creating character, so, if I were to call it C, and if I assign a value so anybody so that's a sign of value, our backslash t so this is the tab character, even though it's got to counter that, you know people because got that flashing means an escape sequence. So you just know one form character, system, dot out dot print.
Ln. So if let's say I just put Hello, like so it puts Hello. But let's say if I put C at the start of it. I'm gonna, I didn't see he puts a tab though he puts a tab character, you can put that anywhere. So if I were to put it here as well, and I put world and run it there we go, we got the top character inside as well. So the next thing to note, I can you might wonder why the space is a little different to this space.
So the space should be this, you know, in Thailand, but he actually goes from where this is, as you can see that is the exact line to this. So it's not where it starts. It's from the previous tab, and also bear in mind, well, there's a bunch of other escape sequences, like where you can insert a single quote as well, you can insert a backspace in the text if you want to be a link with this video where you can check all of the different features out. Now, let's cover some of the methods that are available to us. So let's create a new coat. I'll call it char.
Awesome. equals and I am going to call this a C. Call this big is easy to see if it's okay so the case and you'll see in a second. So what we can do is we can check a letter simply by doing the system dot print ln missing the end So System dot out dot print line, I'm going to say character.is letter. So if it's a letter awesome in here, and we run it, it puts a tricky so let's say follows. Character eight. Now, it's not a letter, but it is still a valid character.
So that's really cool. If you're checking if letting go some user input, and maybe the number breaks it or the number doesn't break it, you can do it. What's the number one four, if it's a number one let you check that out from the link Darrell provides. So I want to cover a couple more. One is checking if it's uppercase. So let's have a look at the system dot print.
Lm in here. Awesome. And if I change this to be I'm sorry, I'm in character not to cater is okay. And I'll provide character and you could put it in line. However, if you want to do something like that, well, you can use this you know, wherever you want, you could use it in an if statement, they just returns true or false printing so you can immediately see, what we notice is false. If I change this to a capital V, our vessels don't technically ascend that tell you when we looked at it, it is true.
And one final one that I'm going to cover if the lower case Under this system quintella character.to uppercase under the two locations also feel free to check them. Awesome. And if I were to print this out, you just print printed the same way a lowercase b however, it prints out D, uppercase B. So we've covered quite a few methods and escape sequence character as well in this character video. If you have any questions or you want to check out more of the functionality that you can do with characters, feel free to check out the link with you know this tutorial. If you have any questions also feel free to reach out as usual.
Thanks for watching, and look forward to seeing you in the next awesome video.