 So one of the things that we use in Java is something known as a string and if we Take a look at those videos that we were just watching You might notice that a string is really just kind of a collection of char data types of char Data types, it's a just a bunch of those together Data types So how do we start to look at them? How do we start to represent all of this this collection? You might notice that I've kind of broken down this word, you know, hello world This sentence what and then underneath it you see I have these numbers These numbers right here. These are known as my index If I need to represent or if I need to have access to any one particular letter I Go to its index. So let's say for example. This is known as STR STR equals hello world Put my little quotes on the in there to make it official Simical so What if I want to represent I want to get you know the the w well what I can do is I can say STR dot char at 7 And what that does is it looks at this seven and it goes all right. Well What is the value at that index? This is then going to spit out a char data type W now something I want to take note of if you notice right to the left of it There's this kind of blank spot. Well one thing about Chars is just like we were kind of talking about when we thought about escape characters a Space is actually, you know a valid Character, so if I were to say STR dot char at 6 Guess what I'm actually going to get not a blank. I'm actually gonna get something. There's an empty Thing it's empty. It's a it's a character that we're getting back when we look at that So we have all these different things and now one of the other things that we can do with a string is we can actually create something known as a Sub string a Substring and what this is is we now are going to look at the string that we have and we're actually going to chop it up So say for example, I I want the the hello, but I don't really care about the world Let me rephrase it I I want the hello, but I don't care about the portion of my string that says world Now I'm gonna get angry emails from hippies So I don't want that that world at all. I don't want that I want the hello So what I can do is again, I can write out something like STR and as you can kind of guess if I can use these methods that are pre-built I can design something like Substring now substring takes two parameters. It takes a Beginning and it takes an ending So My beginning mall. I want to start at the beginning. I want to start here at age So I'm gonna say my beginning is gonna be zero now What about my ending now my ending actually is gonna it's gonna run up until That number so if I said hello, I don't want to say four I do not want to say four because that's actually gonna get cut off I want to go one more than that. So I want to actually say Five so that'll give me the character at zero the character at one two three Four but not including five So if I were to do a system dot out dot front line what I would get is Hello, so let's put this into practice just like always I build my string equals Hello world And I want to just build that sub string. I just want to take it and make it so I'm gonna I'll just call this sub str.substring zero comma five System dot out that print L in Sub We compile this up. We run this Give me just the same there. We are Java C test that Java we don't see any compiling errors excellent Java test Hello now like I said if I extend that out if I go to Six because I don't know maybe I want to say hello I'm actually gonna extend it out to a seven The reason why is to include that blank space that I'm just looking at Hello plus Adam Compiled up Java it up look what happens. I've taken now a substring and then through something called string concatenation string con cat in nation I Can take the word hello comma with a space and then add whatever I want afterwards pretty sweet