Is that we can actually concatenate strings together.
OK.
The string class includes a method for concatenating two strings.
OK.
So now as you can see the name of my string object is the are one that can concat as you can see.
Now we can actually choose this option here.
And as you can see here it's now showing us some information about this method inside the class.
OK.
So this method actually accepts an argument of type A string and the return type of this method is as
strange and dismay if it is inside this three in class so here as you can see it's now showing us some
information about this method.
This Byford concatenates specified strange to the end of this strange.
OK.
If the length of the argument the string is zero then this strange object is returned otherwise a strange
object is returned that that represents a character sequence that is the concatenation of the character
sequence represented by this strange object and the character sequence represented by the arguments.
So now let's actually choose this option here.
And now I can actually put in a strong leader on here as you can see here we need to put in our string
object.
OK so I can't just put into double quotes here.
And now I can actually put in another value.
OK.
And now I need to actually put in a semi-colon at the end of my statement.
So now as you know this contrasts Smurfette returns a value of type.
Strange.
OK so now I can actually output this value directly to the console.
Or I can actually assign this value.
This returns value to another strange object.
OK so now I want to show you both ways in order to make this concept more meaningful for you.
So I just into the open here System start out that princeling and then inside the apprentice's I can
just put this statement here inside of this prentices.
And then I need to put in a semicolon at the end of my statement.
So now if I write on my project as you can see that it's going to actually output this value to the
console a value another value.
OK so if we actually put a space here and if I get on my project again as you can see it's going to
actually output this value to the console.
OK so now let me get to comment out this line of code here and if I create another string object and
the name of my string object is for example the are two.
And then I need to put in an assignment operator here and then I can actually assign this statement
here to my Esti are two a string instance.
OK.
And then I need to put in a semicolon at the end of my statement.
So as you can see here the Smurfette returns a string value.
Ok so I can actually put that returned value to this.
It's the R to an object.
OK.
And now I can actually output that value to the console.
So I just need to type in here or system that out that princeling.
And then inside the prentices I can just refer to the name of my Esti are two object and then I need
to put in a semicolon at the end of my statement.
So as you can see here again it's going to actually output this value to the console.
So there are lots of other effects that we can use on screen objects which you can find them inside
the Java documentation's in the Oracle Web site.
So make sure that you check those documentations later in this course.
I'll talk more about those methods.
I can actually call and other Meffert and this is the are to object for example.
For example I can make the characters of this string object uppercase.
So I just need to typing Esti are two dots to uppercase.
OK.
As you can see here the Smurfette returns a string object and this method is inside the string class.
OK.
So if I just choose this option I need to put in a semicolon at the end of my statement.
So as you know this MF'er returns a string object.
So I can't just directly outputs that value to the console.
System that out that princeling and then inside the prentices I can just refer to the name of the Asti
are two object.
That's true.
Uppercase OK.
And then I need to put in a semicolon at the end of my statement.
OK.
Now if I had on my project as you can see this value is now output to the console.
OK and remember that in this line of code here we are actually making a copy of the Esti are two object
in order to make the characters of these a string object approaches.
OK.
If you want the characters of the 60 or two object to be uppercase forever you need to assign this method
here to another string object.
OK.
As you can as you know this method returns a string object.
OK.
And if I actually assign the return value of this method to another as an object to the characters of
that string object is going to be uppercase.
But for this line of code you're actually temporarily making the characters of the ASCII are to object
uppercase.
And then after this line of code after line forthy actually just type in system that out that princeling.
And that inside the prentices if I actually refer to the name of this or to object.
The character of this object is going to be as normal as you can see here.
OK.
Now the characters of this as the are to object is normal but here in line 40 we just temporarily made
the characters of this is the are to object to uppercase and then it actually changed back to normal.
OK but if you want to change the characters of this s t r to object to uppercase for ever.
I just need to assign the return value of this Mefford to another string object.
So I just need to type in here as strange another as the R and then I need to put in an assignment operator
here and then I need to put this statement here as a value to this as an object.
OK.
And now this and other is are object and now the characters of this and other Esti are object is going
to be uppercase.
So I just need to say I've been here system that out that printin and and in say the prentices I can
just put into double quotes and say double quotes.
I can just type in the characters of another or object are now uppercase and then I need to put up plus
operator here in order to concatenate this strange here.
This value of B.
D and other s.t. or object and other Esti are objects.
OK.
And then I need to put in a semicolon at the end of my statement.
OK.
So now if I write on my project as you can see it's going to have this value to the console locate the
characters of another object are now uppercase a value and other value.
So now if we're actually putting a space here and if I it on my project again as you can see it's going
to actually make this value here more readable.
OK.
And as you can see here now the characters of our and other object are uppercase and here if we actually
want to output the value of the other a c or object to the console.
Let's see how this is done.
OK system turns out that princeling and an inside the apprentice's I can just revert to the name of
my A.S.C. or object.
And again if I run my project the characters and other Esti or object are uppercase.
OK but the characters of the art object are normal.
OK so if I just want to output the value of them as the two object to the console I can just type in
here system that out that princeling.
And then inside the apprentice's I can just refer to the name of the object.
And as you can see here if I run my project as you can see it's going to actually output this value
to the console OK.
So now I can actually make the characters of the a c or two object lowercase.
So in this case I can just type in here a system that's out that insulin and then inside Apprentice's
I can just revert to the name of my object as the are to start to lowercase and then I need to put in
a semi-colon at the end of my statement.
And now if I go on my project as you can see it's going to output this value to the console OK.
So I think that's enough for this tutorial.
And in the next tutorials I'll talk more about this thing.
Objects and string methods.
But if you have any questions please post the discussion in of course.
And thank you very much for watching and I'll see you in the next tutorial.