1
00:00:00,450 --> 00:00:06,650
And here I want to actually create an ideal array of integer numbers so in.

2
00:00:07,060 --> 00:00:07,620
OK.

3
00:00:07,800 --> 00:00:12,900
And then I need to specify that I am going to create an array by putting in a pair of brackets after

4
00:00:12,900 --> 00:00:18,410
my type name which A and the name of my area is occurrence.

5
00:00:19,210 --> 00:00:20,080
OK.

6
00:00:20,640 --> 00:00:29,490
And then I put in an assignment operator here new it and here I need to actually specify the size of

7
00:00:29,490 --> 00:00:30,060
my arii.

8
00:00:30,090 --> 00:00:35,250
Ok so my Aure is going to actually accept 6 integer numbers.

9
00:00:35,280 --> 00:00:36,400
OK.

10
00:00:37,200 --> 00:00:41,630
And now let's actually create a for loop for.

11
00:00:41,880 --> 00:00:49,700
And inside the prentices of this for loop I want to actually create an integer variable in this pond.

12
00:00:50,520 --> 00:00:51,130
OK.

13
00:00:51,270 --> 00:00:56,280
Then the name of my variable is respondent assignment operator 0.

14
00:00:56,700 --> 00:00:57,440
OK.

15
00:00:57,510 --> 00:01:08,460
And here I need to actually specify a condition for this loop until respond is less than people rates

16
00:01:08,730 --> 00:01:09,660
that lead.

17
00:01:09,930 --> 00:01:10,650
OK.

18
00:01:10,890 --> 00:01:16,650
So this loop is going to be actually executed on till the value of this response.

19
00:01:16,650 --> 00:01:23,250
Valuable here as you can see is less than the value of the length of these people rates.

20
00:01:23,550 --> 00:01:24,330
OK.

21
00:01:24,750 --> 00:01:28,610
And then here I need to actually type in response.

22
00:01:29,280 --> 00:01:30,680
Plus plus.

23
00:01:31,230 --> 00:01:37,050
So after each execution of this loop the value of this response really a Above is going to be incremented

24
00:01:37,290 --> 00:01:37,980
by 1.

25
00:01:38,040 --> 00:01:39,430
OK.

26
00:01:40,140 --> 00:01:47,160
So now inside of these curly braces I want to actually manipulate the values that are inside of this

27
00:01:47,160 --> 00:01:48,310
occurrence arai.

28
00:01:48,510 --> 00:01:53,700
So as you know by default the values are that I should instead of this occurrence rate are actually

29
00:01:53,700 --> 00:01:54,620
zeroes.

30
00:01:54,660 --> 00:01:58,070
And here I want to manipulate those values.

31
00:01:58,140 --> 00:02:02,630
So here I can just type in plus plus occurrence sup.

32
00:02:03,210 --> 00:02:04,460
Respond.

33
00:02:05,220 --> 00:02:05,960
OK.

34
00:02:06,540 --> 00:02:11,790
So in this way for example the value of this response for the first time that this group is going to

35
00:02:11,790 --> 00:02:15,540
be executed the value of this response variable is 0.

36
00:02:15,550 --> 00:02:19,430
OK so this zero is going to be here inside of these brackets.

37
00:02:19,470 --> 00:02:21,990
OK the value of this response variable is 0.

38
00:02:21,990 --> 00:02:29,280
OK so a clearance Sub Zero is going to actually give me the value that is inside of the index zero of

39
00:02:29,280 --> 00:02:30,310
this occurrence.

40
00:02:30,360 --> 00:02:30,900
OK.

41
00:02:31,170 --> 00:02:33,970
So here as you can see we actually created this array.

42
00:02:33,990 --> 00:02:34,560
OK.

43
00:02:34,860 --> 00:02:40,320
And we didn't actually assign any value to this to the index as of this hour.

44
00:02:40,350 --> 00:02:45,930
OK we just specified that this area is going to actually accept 6 integer numbers.

45
00:02:46,050 --> 00:02:46,740
Okay.

46
00:02:46,860 --> 00:02:53,840
And by default the values that are actually inside of the indexes of this Aure are actually zeros.

47
00:02:53,850 --> 00:02:57,930
So here I am saying plus plus occurrence respond.

48
00:02:58,050 --> 00:03:02,730
So for the first time that this rule is going to be executed the value of this responder variable is

49
00:03:02,730 --> 00:03:03,320
zero.

50
00:03:03,480 --> 00:03:10,500
So a plus plus occurrence Sub Zero is going to actually increment the value that is inside of the index

51
00:03:10,520 --> 00:03:12,480
zero of this.

52
00:03:12,620 --> 00:03:18,520
OK increment the value that is inside of the index zero of this aere by 1.

53
00:03:18,600 --> 00:03:19,400
OK.

54
00:03:19,800 --> 00:03:22,350
So hopefully that makes sense.

55
00:03:22,350 --> 00:03:25,620
And now let's actually create after this for a loop.

56
00:03:25,770 --> 00:03:28,060
This is truly create another for loop.

57
00:03:28,200 --> 00:03:28,880
OK.

58
00:03:29,190 --> 00:03:36,350
And here inside of the Prentice's Let's actually create an integer variable int amount.

59
00:03:36,720 --> 00:03:37,380
OK.

60
00:03:37,480 --> 00:03:39,620
Assignment operator number one.

61
00:03:39,750 --> 00:03:40,240
OK.

62
00:03:40,380 --> 00:03:41,640
Semi-colon here.

63
00:03:41,660 --> 00:03:46,470
I need to actually create a condition in which this loop is going to execute.

64
00:03:46,470 --> 00:03:54,900
So until the value of this amount to rebuild is less than the value of the occurrence rate that lenth

65
00:03:55,330 --> 00:04:02,480
OK until the value of this amount variable is less than the value of this of the length of this occurrence.

66
00:04:02,480 --> 00:04:02,940
Ari.

67
00:04:02,970 --> 00:04:03,450
Okay.

68
00:04:03,570 --> 00:04:06,910
And here I am just an amount plus plus.

69
00:04:07,110 --> 00:04:13,590
And here I am saying that after each execution of this for loop it's going to actually increment the

70
00:04:13,590 --> 00:04:16,260
value of this amount variable by VH1.

71
00:04:16,350 --> 00:04:16,910
Okay.

72
00:04:17,010 --> 00:04:23,730
So here inside of this curly braces of this for loop again just our first of all I want to instantiate

73
00:04:24,060 --> 00:04:27,980
these two strange objects that I actually declared here.

74
00:04:27,990 --> 00:04:28,630
OK.

75
00:04:29,130 --> 00:04:34,140
So first I can just type in old t.a exteriorise value.

76
00:04:34,280 --> 00:04:35,110
OK.

77
00:04:35,250 --> 00:04:36,980
Assignment operator here.

78
00:04:36,990 --> 00:04:41,660
I can just type in to 60 rates not get text.

79
00:04:42,400 --> 00:04:45,220
Okay that's too strange here.

80
00:04:45,310 --> 00:04:50,640
I am actually getting the value of these the takes view object and that I am actually converting that

81
00:04:50,640 --> 00:04:55,770
value to a string value so that I can actually assign that's why they you this old to use the rates

82
00:04:55,770 --> 00:04:56,440
value here.

83
00:04:56,460 --> 00:04:57,310
OK.

84
00:04:57,750 --> 00:05:05,450
And here again I can't just type in all DX the number of stars value assignment operator the number

85
00:05:05,450 --> 00:05:10,440
of stars that it takes that to think OK.

86
00:05:11,090 --> 00:05:17,930
And here I am actually getting the value of this RTX the number of stars takes few and I am converting

87
00:05:17,930 --> 00:05:24,140
that's why due to a string value so that I can actually assign that value to this all x number of number

88
00:05:24,140 --> 00:05:25,690
of stars value here.

89
00:05:25,730 --> 00:05:26,240
OK.

90
00:05:26,420 --> 00:05:33,860
And now I want to go out with some values to the screen so I can just typing to the rates that said

91
00:05:33,860 --> 00:05:34,960
text.

92
00:05:35,340 --> 00:05:42,100
And inside Apprentice's first of all I want to output the value of this all t exhilarates value.

93
00:05:42,200 --> 00:05:47,600
OK so that I can actually see the previous values that that actually out with it to this screen.

94
00:05:47,780 --> 00:05:57,010
So here I can just I think old key extracts value plus here I want to concatenate this value 15 U.S.

95
00:05:57,050 --> 00:06:03,640
values or other values plus amount here.

96
00:06:03,860 --> 00:06:09,500
OK I referred to the name of this amount variable so that they can actually read the values of this

97
00:06:09,590 --> 00:06:11,140
amount variable here.

98
00:06:11,150 --> 00:06:11,850
OK.

99
00:06:12,260 --> 00:06:20,310
Again I want to actually take anti-X the number of stars takes a view that said text again.

100
00:06:20,320 --> 00:06:25,130
I want to output the old DX the number of stars value here.

101
00:06:25,490 --> 00:06:33,050
OK so that I can actually see that the previous values plus OK occurrence occurrence.

102
00:06:33,480 --> 00:06:38,620
Sup em out OK here.

103
00:06:38,870 --> 00:06:40,070
As you can see.

104
00:06:40,070 --> 00:06:43,980
First of all you referred to the name of this string object.

105
00:06:44,000 --> 00:06:50,360
OK and then I put a plus operator here and then I refer to the name of this Aure occurrence.

106
00:06:50,360 --> 00:06:57,040
OK so as you can see here this is our Aure that we actually created in line 27 sub him out OK.

107
00:06:57,530 --> 00:07:00,020
And here for the first time that for example.

108
00:07:00,020 --> 00:07:02,130
This loop is going to be executed.

109
00:07:02,210 --> 00:07:05,440
The value of this amount of variable is 1.

110
00:07:05,510 --> 00:07:06,620
OK number one.

111
00:07:06,860 --> 00:07:13,340
So here it's going to actually output number of 1 to the screen and it's going to actually output the

112
00:07:13,340 --> 00:07:19,200
value that is inside of the index number of one of these occurence array.

113
00:07:19,290 --> 00:07:27,290
OK so now after this amount here let's actually create a newline character by default slash in and here

114
00:07:27,320 --> 00:07:28,690
after this occurrence.

115
00:07:28,820 --> 00:07:29,900
Sup em out here.

116
00:07:29,960 --> 00:07:30,250
Put.

117
00:07:30,250 --> 00:07:30,650
A-plus.

118
00:07:30,660 --> 00:07:34,310
Operator And then to double quotes and say double quotes.

119
00:07:34,370 --> 00:07:35,980
Put a new line character here.

120
00:07:35,990 --> 00:07:36,430
OK.

121
00:07:36,510 --> 00:07:38,730
Backward slash an ant.

122
00:07:38,780 --> 00:07:42,890
Now let's actually run our project and see what happens.

123
00:07:47,160 --> 00:07:50,910
OK as you can see here our application actually crashed.

124
00:07:50,920 --> 00:07:51,520
OK.

125
00:07:51,530 --> 00:07:54,370
Unfortunately AB 17 has stopped.

126
00:07:54,390 --> 00:07:59,700
OK so now let's ask you to go inside the log and see what's the cause of this error.

127
00:07:59,840 --> 00:08:00,430
OK.

128
00:08:00,590 --> 00:08:05,930
So as you can see here inside of the lock or key select this android monitor so that you can see the

129
00:08:05,930 --> 00:08:14,150
lugs here and here in order to see the errors here inside the lab level section you can actually choose

130
00:08:15,280 --> 00:08:15,860
error.

131
00:08:15,940 --> 00:08:21,110
OK so that you can only see what's the cause of this error.

132
00:08:21,110 --> 00:08:21,690
OK.

133
00:08:21,910 --> 00:08:23,530
Fatal exception made.

134
00:08:23,570 --> 00:08:24,240
OK.

135
00:08:24,530 --> 00:08:33,900
And here as you can see it says a component info here Jova that landed Arey index out of bounds.

136
00:08:33,970 --> 00:08:35,360
Exception.

137
00:08:35,540 --> 00:08:37,830
Six index six.

138
00:08:37,930 --> 00:08:46,190
OK so here it says that we actually tried to access the index six of this occurrence.

139
00:08:46,220 --> 00:08:47,370
OK.

140
00:08:47,390 --> 00:08:51,680
So as you know in our programming we always count from number zero.

141
00:08:51,710 --> 00:08:52,130
OK.

142
00:08:52,220 --> 00:08:58,480
For example here we actually specified that this Auret is going to accept 6 integer numbers.

143
00:08:58,500 --> 00:09:10,920
OK so we count the values that are actually inside of this occurrence I a Lotus 0 1 2 3 4 5 done.

144
00:09:11,390 --> 00:09:20,560
OK so if we actually count these values here we have 6 integer numbers 1 2 3 4 5 6.

145
00:09:20,570 --> 00:09:21,150
OK.

146
00:09:21,530 --> 00:09:25,920
And here as you can see these are the indexes of this Aure.

147
00:09:25,940 --> 00:09:29,970
Are these six values as you can see are the indexes of this.

148
00:09:30,040 --> 00:09:30,520
OK.

149
00:09:30,740 --> 00:09:39,380
And we cannot actually access the index number six of these because these are a can only accept 6 integer

150
00:09:39,380 --> 00:09:40,040
numbers.

151
00:09:40,040 --> 00:09:47,780
OK so these are the six digit numbers and we cannot for example access and the index number 6.

152
00:09:47,870 --> 00:09:48,650
That's not right.

153
00:09:48,650 --> 00:09:49,040
OK.

154
00:09:49,130 --> 00:09:50,470
That's the cause of our error.

155
00:09:50,480 --> 00:09:58,280
As you can see here it says Java don't like that Arey index out of bounds exception Linfa 6 index 6.

156
00:09:58,370 --> 00:09:58,900
OK.

157
00:09:59,090 --> 00:10:06,170
If we actually click on this blue link here I mean activity that Java 41 here as you can see it says

158
00:10:06,380 --> 00:10:09,480
the cause of this error is this line of code here.

159
00:10:09,620 --> 00:10:10,060
OK.

