OK.
And then we can actually add to the value of this brave instance valuable to this string value here.
Plus strange that format and then I first of all I need to actually specify the formatting instructions
here.
So first of all I put into double quotes here and then present as Colan percent B.
Ok so now I need to actually specify the arguments for this for these tokens.
So here I put in a two double quotes here and then I actually use a string literal here.
OK.
Our brave
OK and then I put a comma here is brave.
OK.
So as you can see here with just one line of code.
Now we actually are inheriting all of those features that are inside this math class and inside this
math class we are actually inheriting all of those features that are inside this Animal class.
And in this way our codes are more maintainable.
And this is more powerful than actually duplicating quotes.
In this way we're actually using the power of inheritance.
Now we know that we can actually use this power in order to create more maintainable applications.
OK.
So as you can see here it's now showing us an error because we actually changed the access modifier
of this instance variables inside this Animal class to private.
So we need to actually change these instance variables to another name.
For example this name instance variable can be name this Karlo instance variable can be Jets color and
this amount of speed instance variable can be IMAO get amount of speed.
And here we can actually change the name of this instance variable to get amount of power.
OK so now the error is gone.
And let's go back inside this line class again.
Now we did manage to actually put our own implementations inside these two string method.
OK.
So let's go back inside this main activity that Java here.
And now let's actually create an object from this lion class lion my lion and then I put an assignment
operator here Neo lion and here I need to actually pass some values to this our constructor here.
OK.
So as you can see here are the constructor that is inside this line class is going to be called when
ever we actually create an object from this low class.
I need to actually specify the name of this line.
So the name of my line is my line.
And then I need to specify the color of my lion for example.
Golden.
OK.
And then I need to specify the amount of speed of my lion for example 90.
And then I need to actually specify the amount of power of my lion for example 300.
And then I need to actually specify the number of legs for.
And then I need to actually specify a value for this.
Can hunt other animals.
True.
And then I need to actually specify a value for this is brave boolean variable OK so true.
OK.
And now I can actually type in here TXI the line that said text.
And here I can actually fair to the name of this my life an object that is three in Meffert here.
OK.
And now if I run my project let's see what happens.
So as you can see here now these are the values that are out that are outputted here.
OK name my lion.
Actually the color golden speed 90.
Power 300 number of legs for fight true animal value are 27000 brave.
True.
OK.
So hopefully that makes sense.
I think that's enough for this the whole deal.
And in the next tutorial we can actually continue building which are our fourth Android application.
OK.
So if you have any questions please post the discussion in the course and then I'll do my best to answer
your questions.
And thank you very much for watching and I'll see you in the next tutorial.