1
00:00:00,140 --> 00:00:00,880
OK.

2
00:00:01,440 --> 00:00:08,100
And then we can actually add to the value of this brave instance valuable to this string value here.

3
00:00:08,100 --> 00:00:16,020
Plus strange that format and then I first of all I need to actually specify the formatting instructions

4
00:00:16,020 --> 00:00:16,500
here.

5
00:00:16,620 --> 00:00:22,990
So first of all I put into double quotes here and then present as Colan percent B.

6
00:00:23,470 --> 00:00:30,010
Ok so now I need to actually specify the arguments for this for these tokens.

7
00:00:30,330 --> 00:00:37,140
So here I put in a two double quotes here and then I actually use a string literal here.

8
00:00:37,560 --> 00:00:38,720
OK.

9
00:00:39,060 --> 00:00:40,920
Our brave

10
00:00:43,770 --> 00:00:48,480
OK and then I put a comma here is brave.

11
00:00:48,950 --> 00:00:49,450
OK.

12
00:00:49,510 --> 00:00:52,800
So as you can see here with just one line of code.

13
00:00:52,940 --> 00:01:00,670
Now we actually are inheriting all of those features that are inside this math class and inside this

14
00:01:00,700 --> 00:01:05,310
math class we are actually inheriting all of those features that are inside this Animal class.

15
00:01:05,410 --> 00:01:08,590
And in this way our codes are more maintainable.

16
00:01:08,770 --> 00:01:12,480
And this is more powerful than actually duplicating quotes.

17
00:01:12,520 --> 00:01:16,040
In this way we're actually using the power of inheritance.

18
00:01:16,060 --> 00:01:26,270
Now we know that we can actually use this power in order to create more maintainable applications.

19
00:01:26,290 --> 00:01:27,070
OK.

20
00:01:27,100 --> 00:01:32,710
So as you can see here it's now showing us an error because we actually changed the access modifier

21
00:01:32,770 --> 00:01:37,090
of this instance variables inside this Animal class to private.

22
00:01:37,090 --> 00:01:44,280
So we need to actually change these instance variables to another name.

23
00:01:44,380 --> 00:01:53,170
For example this name instance variable can be name this Karlo instance variable can be Jets color and

24
00:01:53,260 --> 00:01:59,050
this amount of speed instance variable can be IMAO get amount of speed.

25
00:01:59,500 --> 00:02:05,840
And here we can actually change the name of this instance variable to get amount of power.

26
00:02:06,150 --> 00:02:09,040
OK so now the error is gone.

27
00:02:09,340 --> 00:02:11,770
And let's go back inside this line class again.

28
00:02:11,770 --> 00:02:16,850
Now we did manage to actually put our own implementations inside these two string method.

29
00:02:16,870 --> 00:02:17,540
OK.

30
00:02:17,860 --> 00:02:20,670
So let's go back inside this main activity that Java here.

31
00:02:21,100 --> 00:02:29,890
And now let's actually create an object from this lion class lion my lion and then I put an assignment

32
00:02:29,950 --> 00:02:37,780
operator here Neo lion and here I need to actually pass some values to this our constructor here.

33
00:02:37,780 --> 00:02:38,620
OK.

34
00:02:39,160 --> 00:02:44,830
So as you can see here are the constructor that is inside this line class is going to be called when

35
00:02:44,830 --> 00:02:47,840
ever we actually create an object from this low class.

36
00:02:47,850 --> 00:02:50,720
I need to actually specify the name of this line.

37
00:02:51,190 --> 00:02:54,940
So the name of my line is my line.

38
00:02:55,570 --> 00:03:00,270
And then I need to specify the color of my lion for example.

39
00:03:01,060 --> 00:03:02,580
Golden.

40
00:03:03,620 --> 00:03:04,390
OK.

41
00:03:04,720 --> 00:03:10,330
And then I need to specify the amount of speed of my lion for example 90.

42
00:03:11,380 --> 00:03:16,950
And then I need to actually specify the amount of power of my lion for example 300.

43
00:03:17,200 --> 00:03:21,470
And then I need to actually specify the number of legs for.

44
00:03:22,270 --> 00:03:24,800
And then I need to actually specify a value for this.

45
00:03:24,800 --> 00:03:26,570
Can hunt other animals.

46
00:03:26,620 --> 00:03:27,340
True.

47
00:03:27,670 --> 00:03:34,310
And then I need to actually specify a value for this is brave boolean variable OK so true.

48
00:03:34,900 --> 00:03:35,720
OK.

49
00:03:36,490 --> 00:03:44,610
And now I can actually type in here TXI the line that said text.

50
00:03:45,010 --> 00:03:51,870
And here I can actually fair to the name of this my life an object that is three in Meffert here.

51
00:03:51,880 --> 00:03:52,450
OK.

52
00:03:52,630 --> 00:03:55,690
And now if I run my project let's see what happens.

53
00:03:55,690 --> 00:04:00,610
So as you can see here now these are the values that are out that are outputted here.

54
00:04:00,610 --> 00:04:02,510
OK name my lion.

55
00:04:02,590 --> 00:04:05,840
Actually the color golden speed 90.

56
00:04:05,860 --> 00:04:13,690
Power 300 number of legs for fight true animal value are 27000 brave.

57
00:04:13,720 --> 00:04:14,260
True.

58
00:04:14,470 --> 00:04:15,160
OK.

59
00:04:15,920 --> 00:04:17,740
So hopefully that makes sense.

60
00:04:17,760 --> 00:04:20,200
I think that's enough for this the whole deal.

61
00:04:20,420 --> 00:04:26,380
And in the next tutorial we can actually continue building which are our fourth Android application.

62
00:04:26,480 --> 00:04:27,040
OK.

63
00:04:27,170 --> 00:04:32,300
So if you have any questions please post the discussion in the course and then I'll do my best to answer

64
00:04:32,300 --> 00:04:33,350
your questions.

65
00:04:33,680 --> 00:04:37,970
And thank you very much for watching and I'll see you in the next tutorial.

