1
00:00:00,330 --> 00:00:07,260
I want to actually arrange the values that are inside of this tree in an ascending order.

2
00:00:07,260 --> 00:00:07,830
OK.

3
00:00:08,040 --> 00:00:12,780
So in order to do that I'm going to actually putting some lines of code here and then I explain to you

4
00:00:12,780 --> 00:00:13,750
what's going on here.

5
00:00:13,770 --> 00:00:14,520
OK.

6
00:00:14,880 --> 00:00:21,060
So as you can see here these are the lines of code that are actually posted here that are actually pasted

7
00:00:21,060 --> 00:00:25,850
here as you can see and in line 51 as you can see.

8
00:00:25,890 --> 00:00:28,600
You referred to the name of this artist class.

9
00:00:28,820 --> 00:00:29,330
OK.

10
00:00:29,490 --> 00:00:34,050
We have a predefined class in Java arrays dot sort.

11
00:00:34,050 --> 00:00:36,990
So as you can see here this is actually a class of Meffert.

12
00:00:37,020 --> 00:00:42,740
OK we call this method and these are base class arrays that sort of double values Ali.

13
00:00:42,780 --> 00:00:49,800
So this is going to actually arrange the values that are inside of these double values array in an ascending

14
00:00:49,830 --> 00:00:50,330
order.

15
00:00:50,400 --> 00:00:51,140
OK.

16
00:00:51,510 --> 00:00:58,770
And in line 42 I created an object from this string class as you can see I only declare this object

17
00:00:58,770 --> 00:00:59,290
here.

18
00:00:59,430 --> 00:01:00,600
OK this variable.

19
00:01:00,990 --> 00:01:03,220
And then I created a full loop here.

20
00:01:03,240 --> 00:01:09,930
So inside Apprentice's of this foldback you can see first of all I created a variable of type integer

21
00:01:10,440 --> 00:01:13,980
index and then I assign the value 0 to this variable.

22
00:01:14,190 --> 00:01:19,290
And then he had actually created a condition which determines how many times this group is going to

23
00:01:19,290 --> 00:01:20,520
be executed.

24
00:01:20,520 --> 00:01:27,000
So until the value of this index variable is less than the value of the length of these double values

25
00:01:27,060 --> 00:01:27,750
array.

26
00:01:28,080 --> 00:01:29,690
This loop is going to be executed.

27
00:01:29,730 --> 00:01:30,320
OK.

28
00:01:30,660 --> 00:01:38,130
And here I specified that after each execution of this for a loop increment the value of these are inexplicable

29
00:01:38,130 --> 00:01:38,780
by 1.

30
00:01:38,790 --> 00:01:39,540
OK.

31
00:01:39,840 --> 00:01:46,620
So here as you can see inside of this for loop I actually instantiated this variable all the x the R.W.

32
00:01:46,620 --> 00:01:48,310
values assignment operator.

33
00:01:48,720 --> 00:01:51,880
And here I actually referred to the name of this takes you here.

34
00:01:52,050 --> 00:01:58,230
This object takes the arrow double right to use dot gettext and getting the takes of these takes few

35
00:01:58,480 --> 00:01:59,610
thought was strange.

36
00:01:59,700 --> 00:02:04,380
And here I am converting that text to actually a string value.

37
00:02:04,380 --> 00:02:05,220
OK.

38
00:02:05,670 --> 00:02:12,620
And then here I actually assign that my data is all the x the R.W. values and then in line our first

39
00:02:12,660 --> 00:02:20,000
T5 again I actually referred to the name of this XTi a values that said text.

40
00:02:20,040 --> 00:02:26,460
I actually want to set some text to this text view all the tradable values here.

41
00:02:26,490 --> 00:02:31,480
I referred to the name of this variable so that the user can see the previous values.

42
00:02:31,520 --> 00:02:32,090
OK.

43
00:02:32,310 --> 00:02:38,920
Plus here I want to concatenate the value of this value here double values agree here.

44
00:02:38,940 --> 00:02:42,020
I referred to the name of this are a sub index.

45
00:02:42,240 --> 00:02:42,930
OK.

46
00:02:42,930 --> 00:02:49,110
So for example for the first time that this loop is going to be executed executed are the value of this

47
00:02:49,110 --> 00:02:50,580
index variable is 0.

48
00:02:50,640 --> 00:02:51,020
OK.

49
00:02:51,150 --> 00:02:52,640
So double values or index.

50
00:02:52,770 --> 00:02:54,200
Is this value OK.

51
00:02:54,300 --> 00:02:57,810
We're going to give me this 6.3 here to me.

52
00:02:57,810 --> 00:02:58,740
OK.

53
00:02:58,860 --> 00:03:07,110
And here again I actually put it I actually put up plus operator here and here I actually put a space

54
00:03:07,110 --> 00:03:09,490
here OK between the values.

55
00:03:09,510 --> 00:03:13,430
So now let's actually run our project and to see what happens.

56
00:03:13,890 --> 00:03:14,500
OK.

57
00:03:14,670 --> 00:03:21,600
Now as you can see our application is running on this emulator here and here and as you can see the

58
00:03:21,600 --> 00:03:29,170
values that are inside of these double values a here are now actually arranged in an ascending order.

59
00:03:29,170 --> 00:03:29,620
OK.

60
00:03:29,700 --> 00:03:35,040
So you can see these values in some of these scroll you hear if they actually scroll to the left here

61
00:03:35,340 --> 00:03:37,270
I can see the other values.

62
00:03:37,290 --> 00:03:38,450
OK.

63
00:03:38,460 --> 00:03:40,210
So hopefully that makes sense.

64
00:03:40,410 --> 00:03:46,850
Let's actually go back inside this main activity that job off fight here again and after this for loop

65
00:03:46,860 --> 00:03:53,010
here after the ending curly brace of this for loop that's actually putting some lines of code here.

66
00:03:53,100 --> 00:03:58,890
So now I want to actually paste in some lines of code here and then I'll explain to you what's going

67
00:03:58,890 --> 00:03:59,290
on here.

68
00:03:59,310 --> 00:04:00,110
OK.

69
00:04:00,480 --> 00:04:05,070
So as you can see here these are the two lines of code here that they actually paste that here.

70
00:04:05,070 --> 00:04:11,630
First of all in line 49 I actually created an average of integer numbers here as against.

71
00:04:12,120 --> 00:04:15,350
And the name of my great ease and numbers a.

72
00:04:15,780 --> 00:04:20,380
And then here I instantiated this at a by using this new keyboard.

73
00:04:20,550 --> 00:04:25,160
And here you specify the size of my area or the length of my addy.

74
00:04:25,440 --> 00:04:32,860
And then in line 40 I actually again referred to the name of this race class dads feel here.

75
00:04:32,870 --> 00:04:37,230
I want to actually assign some values to my arii.

76
00:04:37,290 --> 00:04:37,670
OK.

77
00:04:37,710 --> 00:04:39,030
I raise that field.

78
00:04:39,030 --> 00:04:44,010
First of all I referred to the name of this R.A. here into numbers are a comma.

79
00:04:44,370 --> 00:04:49,300
And here I specified the value that way that I want to actually assign to this Adoree.

80
00:04:49,360 --> 00:04:53,860
OK so now let's actually create Smurfette OK.

81
00:04:53,880 --> 00:04:56,290
Inside of this main activity class.

82
00:04:56,310 --> 00:05:02,940
Ok so after the ending curly brace of these uncreate Meffert as you can see it let's actually create

83
00:05:03,000 --> 00:05:04,100
another method here.

84
00:05:04,200 --> 00:05:04,890
OK.

85
00:05:05,160 --> 00:05:07,490
As you can see this is my effort here.

86
00:05:07,980 --> 00:05:14,870
And then the access modifier of mame if it is public the return type of this Meffert is void.

87
00:05:14,880 --> 00:05:17,290
So this is going to actually return nothing.

88
00:05:17,400 --> 00:05:24,060
OK the name of this method is output the arrow to the screen and this buffer is going to actually accept

89
00:05:24,060 --> 00:05:24,990
two arguments.

90
00:05:25,020 --> 00:05:29,280
OK so the first argument is actually of type integer array.

91
00:05:29,430 --> 00:05:35,940
As you can see here and the name of this argument is Aure and the second argument is actually of type

92
00:05:36,180 --> 00:05:37,290
text view.

93
00:05:37,500 --> 00:05:39,900
And the name of this argument is takes three.

94
00:05:39,900 --> 00:05:41,040
OK.

95
00:05:41,040 --> 00:05:49,540
So inside of this Meffert as you can see here in line 14:9 I actually created a string variable.

96
00:05:49,560 --> 00:05:58,700
I declared this string variable in line with the here and then I didn't instantiate this variable here.

97
00:05:58,980 --> 00:06:00,310
And here I created.

98
00:06:00,350 --> 00:06:02,010
Oh and enhanced for loop.

99
00:06:02,010 --> 00:06:02,590
OK.

100
00:06:02,910 --> 00:06:08,880
So I want to actually either rate over the values that are inside this array here inside of this integer

101
00:06:08,940 --> 00:06:09,470
array.

102
00:06:09,610 --> 00:06:16,140
OK so I created an integer of argument here number and it's going to iterate over the values that are

103
00:06:16,150 --> 00:06:17,280
inside of these aurea.

104
00:06:17,280 --> 00:06:22,470
Here we're going to actually do something with that valuable with that specific variable.

105
00:06:22,470 --> 00:06:28,940
So here I specified that I actually referred to the name of this string variable here.

106
00:06:28,950 --> 00:06:36,890
So here I actually first through the name of this text view your argument that get takes that was three.

107
00:06:36,990 --> 00:06:39,230
So here I am getting the text of this text.

108
00:06:39,270 --> 00:06:44,190
And I am converting that value to a string value and I assign that value to this.

109
00:06:44,190 --> 00:06:45,000
All it takes.

110
00:06:45,000 --> 00:06:46,050
View of value here.

111
00:06:46,050 --> 00:06:46,720
OK.

112
00:06:47,070 --> 00:06:53,800
And then in line 54 are you referring to the name of this argument takes view that set text.

113
00:06:54,000 --> 00:06:59,360
And then I actually refer to the name of this variable or it takes a value plus number.

114
00:06:59,590 --> 00:07:00,690
OK this is the number.

115
00:07:00,690 --> 00:07:03,390
This is the value that is actually inside of this Arai.

116
00:07:03,510 --> 00:07:03,820
OK.

117
00:07:03,840 --> 00:07:05,540
Plus a space here.

118
00:07:05,670 --> 00:07:06,580
OK.

119
00:07:06,980 --> 00:07:09,680
And now let's actually call this method here.

120
00:07:09,690 --> 00:07:13,540
Inside of this uncreate Meffert out foods the tray to the screen.

121
00:07:13,560 --> 00:07:14,210
OK.

122
00:07:14,370 --> 00:07:18,410
So as you can see if it actually accepts two arguments.

123
00:07:18,510 --> 00:07:22,100
So the first argument is actually of type integer array.

124
00:07:22,170 --> 00:07:27,980
So if you have an integer are a here int numbers every comma.

125
00:07:28,590 --> 00:07:31,380
And the second argument is after it takes you.

126
00:07:31,440 --> 00:07:34,200
So again just typing Tia XTi.

127
00:07:34,800 --> 00:07:38,150
And here I can just refer to the name of this object.

128
00:07:38,340 --> 00:07:40,580
The end numbers are a.

129
00:07:41,190 --> 00:07:44,750
And now let's actually run our project and see what happens.

130
00:07:44,780 --> 00:07:45,860
OK OK.

131
00:07:46,110 --> 00:07:52,710
Now as you can see our application is running on this emulator and here as you can see it says this

132
00:07:52,710 --> 00:07:56,070
is an array of integer numbers and we can see these values here.

133
00:07:56,080 --> 00:07:58,130
OK this number wants here.

134
00:07:58,230 --> 00:07:58,840
OK.

135
00:07:59,040 --> 00:08:06,090
So here we specified that we want to actually these are a this and its numbers are a bit number one

136
00:08:06,150 --> 00:08:06,400
here.

137
00:08:06,420 --> 00:08:06,890
OK.

138
00:08:06,930 --> 00:08:13,960
So as you can see this Aure actually accepts to any integer numbers of k the size of this area is 20.

139
00:08:14,160 --> 00:08:17,750
And here as you can see we can see these number ones here.

140
00:08:17,810 --> 00:08:18,050
OK.

141
00:08:18,060 --> 00:08:19,270
Inside of this arii.

142
00:08:19,380 --> 00:08:19,940
OK.

143
00:08:20,400 --> 00:08:22,750
So hopefully that makes sense.

144
00:08:22,770 --> 00:08:28,050
And let's actually go back and say this main activity that double fight here and now it's actually at

145
00:08:28,260 --> 00:08:29,630
some other courts here.

146
00:08:29,730 --> 00:08:31,910
OK inside these uncreate Smurfette.

147
00:08:31,950 --> 00:08:38,310
So now I'm going to actually pasting some lines of code here and then I'll explain to you what's going

148
00:08:38,310 --> 00:08:38,850
on here.

149
00:08:38,850 --> 00:08:39,580
OK.

150
00:08:39,990 --> 00:08:43,920
So as you can see here these are the lines of code that are actually pasted here.

151
00:08:43,980 --> 00:08:44,620
OK.

152
00:08:44,880 --> 00:08:51,410
So first of all in line 45 I created an integer array called integer a 1.

153
00:08:51,450 --> 00:08:51,950
OK.

154
00:08:52,050 --> 00:08:59,190
And here as you can see I insensate it this way by assigning these values as you can see inside of these

155
00:08:59,190 --> 00:09:03,620
curly braces these values to this integer add a 1 here.

156
00:09:03,690 --> 00:09:04,660
OK.

157
00:09:05,160 --> 00:09:11,530
And here in line 46 I actually created another array here called integer.

158
00:09:11,550 --> 00:09:12,790
Ali 1 copy.

159
00:09:12,900 --> 00:09:13,840
OK.

160
00:09:13,860 --> 00:09:20,520
And then I actually instantiated dicere by using this new keyboard here and here as you can see inside

161
00:09:20,520 --> 00:09:26,310
of the brackets here are actually specified the length of these integers are a copy here.

162
00:09:26,520 --> 00:09:33,040
So the length of these integers are a copy here is the length of this integer at a 1 here.

163
00:09:33,050 --> 00:09:35,980
OK the size of this integer at a point here.

164
00:09:36,060 --> 00:09:36,990
OK.

165
00:09:37,500 --> 00:09:42,810
And then in line 48 I actually created another line of code here.

