1
00:00:00,550 --> 00:00:03,840
And actually Harvard are mouse pointer over the area.

2
00:00:04,050 --> 00:00:05,400
So as you can see here wrong.

3
00:00:05,460 --> 00:00:09,710
Second argument type found in require Java lang that string.

4
00:00:09,720 --> 00:00:12,140
So we need to actually putting a string value.

5
00:00:12,300 --> 00:00:17,130
So in order to convert this integer value to a string value I just need to type in.

6
00:00:17,130 --> 00:00:23,670
I just need to put in a plus operator here and then I need to put into double quotes if I actually run

7
00:00:23,670 --> 00:00:24,720
my project.

8
00:00:24,750 --> 00:00:25,930
Let's see what happens.

9
00:00:25,980 --> 00:00:27,090
OK everyone.

10
00:00:27,090 --> 00:00:31,350
Now as you can see our application is actually running on this emulator.

11
00:00:31,350 --> 00:00:31,980
OK.

12
00:00:32,400 --> 00:00:36,180
So here first of all I need to actually click on this.

13
00:00:36,210 --> 00:00:40,170
Start the loop button here in order to execute these lines of code.

14
00:00:40,160 --> 00:00:42,250
Here is this for loop here.

15
00:00:42,270 --> 00:00:42,820
OK.

16
00:00:43,020 --> 00:00:48,570
So as you can see here this for loop is inside of the stack like listener Meffert that is related to

17
00:00:48,570 --> 00:00:50,060
the Spithead loop button.

18
00:00:50,070 --> 00:00:50,640
OK.

19
00:00:50,940 --> 00:00:55,920
So I just need to click on this start button here and let's see what happens.

20
00:00:56,010 --> 00:00:58,050
So as you can see here I clicked this button.

21
00:00:58,170 --> 00:00:58,720
OK.

22
00:00:58,920 --> 00:01:00,980
Now as you can see here this is our luck.

23
00:01:01,170 --> 00:01:01,800
OK.

24
00:01:02,130 --> 00:01:04,880
So here as you can see there is a log level here.

25
00:01:05,100 --> 00:01:08,800
So just click on this here and then choose info.

26
00:01:09,210 --> 00:01:14,830
So as you can see here this I hear this a lot that this stands for info.

27
00:01:15,030 --> 00:01:15,740
OK.

28
00:01:16,020 --> 00:01:19,180
So that's why we actually typed in a large dot.

29
00:01:19,550 --> 00:01:20,110
OK.

30
00:01:20,370 --> 00:01:30,210
And now here instead of disserved just type it here l o g here as you can see with the uppercase letters.

31
00:01:30,210 --> 00:01:39,880
So as you can see here these are the values that are outputted here which is 0 1 2 3 and 29.

32
00:01:40,250 --> 00:01:40,900
OK.

33
00:01:41,250 --> 00:01:45,530
So here we specified that the that the initial value is zero.

34
00:01:45,550 --> 00:01:47,920
So now let me ask you to make this area bigger.

35
00:01:48,150 --> 00:01:53,790
So here you are as you can see if you specified that the initial value is 0.

36
00:01:53,790 --> 00:01:54,340
OK.

37
00:01:54,390 --> 00:01:56,190
X 0.

38
00:01:56,220 --> 00:01:58,160
So this is our initial value.

39
00:01:58,680 --> 00:02:03,700
And here we specified that the X is less than 50.

40
00:02:04,290 --> 00:02:12,060
So it can actually execute for the for loop 13 times or 0 1 to 29.

41
00:02:12,060 --> 00:02:12,550
OK.

42
00:02:12,690 --> 00:02:20,040
As you can see here the initial value is 0 and we specified that this loop is going to be executed until

43
00:02:20,040 --> 00:02:21,830
the xx is less than 50.

44
00:02:21,900 --> 00:02:27,150
So as you can see here number two in nine we're going to actually add one value to the value of the

45
00:02:27,150 --> 00:02:30,480
Axworthy a bell every time this loop is executed.

46
00:02:30,480 --> 00:02:30,880
OK.

47
00:02:30,930 --> 00:02:33,420
As you can see numbers 0 to number 29.

48
00:02:33,420 --> 00:02:35,600
Now I want to talk about the break statement.

49
00:02:35,610 --> 00:02:36,190
OK.

50
00:02:36,450 --> 00:02:42,780
So inside this main activity that you have a file and inside of this for loop I want to actually use

51
00:02:43,530 --> 00:02:44,590
an if statement here.

52
00:02:44,590 --> 00:02:44,850
OK.

53
00:02:44,890 --> 00:02:51,630
If and that inside the prentices I can just type in x is equal to number.

54
00:02:51,630 --> 00:02:53,090
For example 10.

55
00:02:53,880 --> 00:02:58,330
And then I actually open and close my statement by using these curly braces.

56
00:02:58,380 --> 00:03:00,380
I can just type in break.

57
00:03:01,970 --> 00:03:02,680
OK.

58
00:03:03,100 --> 00:03:07,980
So now let's actually let our project and see what happens.

59
00:03:08,050 --> 00:03:13,480
As you can see here we've got these start the loop pattern here OK so we need to click this button in

60
00:03:13,480 --> 00:03:16,410
order to execute this for loop here OK.

61
00:03:16,510 --> 00:03:18,850
So start the loop ok everyone.

62
00:03:18,910 --> 00:03:23,460
Now as you can see our application is actually running on this emulator here.

63
00:03:23,500 --> 00:03:30,430
And then let's actually click on this start button here because we need to actually click this button

64
00:03:30,790 --> 00:03:32,840
in order to execute this for loop here.

65
00:03:32,860 --> 00:03:33,540
OK.

66
00:03:33,970 --> 00:03:36,600
So I can just click this button here.

67
00:03:37,060 --> 00:03:41,780
And as you can see here now it can actually execute this for loop here.

68
00:03:41,800 --> 00:03:42,320
OK.

69
00:03:42,520 --> 00:03:47,990
So as you can see here we've got some informations that are actually related to the old cats.

70
00:03:48,130 --> 00:03:48,540
OK.

71
00:03:48,580 --> 00:03:55,750
So in order to actually delete these locks we need to actually click these are this clear locked Chad

72
00:03:55,750 --> 00:03:56,030
here.

73
00:03:56,050 --> 00:03:56,440
OK.

74
00:03:56,500 --> 00:03:57,740
OK it is clear.

75
00:03:57,750 --> 00:03:58,810
Look Chad here.

76
00:03:58,990 --> 00:04:03,910
OK so just click on this a clear cut as you can see now the lock Chad is empty.

77
00:04:03,910 --> 00:04:04,800
OK.

78
00:04:04,930 --> 00:04:06,170
So again click on this.

79
00:04:06,190 --> 00:04:07,670
Start the loop here.

80
00:04:08,260 --> 00:04:10,360
And now these are the new information.

81
00:04:10,540 --> 00:04:11,060
OK.

82
00:04:11,320 --> 00:04:18,640
So as you can see here first of all let me point out that we created a full loop here OK for int x is

83
00:04:18,640 --> 00:04:19,700
equal to zero.

84
00:04:19,870 --> 00:04:23,350
X is less than a 30 x plus plus.

85
00:04:23,470 --> 00:04:24,080
OK.

86
00:04:24,310 --> 00:04:30,920
And then inside the for loop I specified that if x is equal to number 10 and break.

87
00:04:31,000 --> 00:04:31,570
OK.

88
00:04:31,600 --> 00:04:33,260
And that in line 65.

89
00:04:33,490 --> 00:04:39,350
I actually decided to output these are values the value of the X valuable to the lock.

90
00:04:39,630 --> 00:04:39,990
OK.

91
00:04:40,030 --> 00:04:41,760
So let's see what is happening here.

92
00:04:41,800 --> 00:04:49,420
0 1 2 3 4 5 6 7 8 9.

93
00:04:49,570 --> 00:04:53,680
As you can see here of when it actually reaches this not the number 9.

94
00:04:53,740 --> 00:04:56,310
It is actually breaking out of this for loop here.

95
00:04:56,440 --> 00:04:59,870
And it is not going to actually execute this for loop anymore.

96
00:05:00,010 --> 00:05:01,860
So that's the job of play.

97
00:05:02,080 --> 00:05:05,670
It is going to actually break out of that a for loop.

98
00:05:05,680 --> 00:05:06,290
OK.

99
00:05:06,340 --> 00:05:07,880
So hopefully that makes sense.

100
00:05:08,140 --> 00:05:12,740
And now I want to actually create an example about it to continue.

101
00:05:13,000 --> 00:05:17,520
So let's actually comment out these lines of code here.

102
00:05:18,740 --> 00:05:27,150
And now let's actually again create up an if statement if and that inside the prentices I can just type

103
00:05:27,150 --> 00:05:30,630
in x is equal to number.

104
00:05:30,640 --> 00:05:37,900
For example 5 and then I need to actually open and close my statement by using this curly braces.

105
00:05:38,050 --> 00:05:43,710
And then inside the curly braces I can just typing continue.

106
00:05:43,720 --> 00:05:46,710
So let's actually run our project and see what happens.

107
00:05:46,840 --> 00:05:47,730
OK everyone.

108
00:05:47,770 --> 00:05:52,190
Now as you can see our application is actually running on this emulator here.

109
00:05:52,270 --> 00:05:52,870
OK.

110
00:05:53,140 --> 00:05:59,050
So first let's actually so first of all let's actually deleted these logs here.

111
00:05:59,380 --> 00:05:59,990
OK.

112
00:06:00,010 --> 00:06:01,220
These are the old lugs.

113
00:06:01,300 --> 00:06:02,750
So we don't need them here.

114
00:06:02,800 --> 00:06:07,040
So just click on this are clear like that here.

115
00:06:07,390 --> 00:06:14,450
And let's actually click this Tarth the loop button here and now as you can see these are the new information.

116
00:06:14,560 --> 00:06:14,970
OK.

117
00:06:15,070 --> 00:06:21,550
So 0 1 2 3 4 6 as you can see.

118
00:06:21,640 --> 00:06:23,670
We cannot see number five here.

119
00:06:23,710 --> 00:06:23,980
OK.

120
00:06:23,980 --> 00:06:27,450
It didn't actually execute this line of code here.

121
00:06:27,490 --> 00:06:29,740
When it reaches number five.

122
00:06:30,150 --> 00:06:33,700
OK this for loop is going to be executed 30 times.

123
00:06:33,700 --> 00:06:40,270
It can actually start with the number 0 1 2 and 2 number 29 which is going to be 50 times that this

124
00:06:40,270 --> 00:06:41,990
loop is going to be executed.

125
00:06:42,250 --> 00:06:42,720
OK.

126
00:06:42,790 --> 00:06:47,760
But when it reaches the number five it is not going to execute this line of code.

127
00:06:47,790 --> 00:06:49,090
It is not going to execute.

128
00:06:49,150 --> 00:06:53,610
Are other lines of code after this statement here.

129
00:06:53,620 --> 00:06:54,220
OK.

130
00:06:54,310 --> 00:07:00,040
And this means and this means it's going to to go again inside of this for loop and add one value to

131
00:07:00,040 --> 00:07:01,570
the value of the variable.

132
00:07:01,600 --> 00:07:05,610
So when it reaches the number five it is not going to actually execute other lines of code.

133
00:07:05,620 --> 00:07:11,860
After this if statement and it's going I should add one value to the value of the x variable and then

134
00:07:11,860 --> 00:07:13,860
it's going to actually be number 6.

135
00:07:13,870 --> 00:07:17,500
So as you can see here this is number 6 and 7 and so on.

136
00:07:17,860 --> 00:07:18,580
OK.

137
00:07:18,940 --> 00:07:21,020
So hopefully that makes sense.

138
00:07:21,250 --> 00:07:24,370
And I think that's enough for this tutorial.

139
00:07:24,490 --> 00:07:29,950
And if you have any questions please post the discussion in the calls and then I'll do my best to answer

140
00:07:29,950 --> 00:07:30,860
your questions.

141
00:07:30,930 --> 00:07:35,230
And thank you very much for watching and I'll see you in the next tutorial.

