1
00:00:00,240 --> 00:00:07,440
And this means that of actually switching between the values of these names Thring valuable and many.

2
00:00:07,590 --> 00:00:12,770
And in case the value of these names to be invaluable is animal one.

3
00:00:12,920 --> 00:00:13,290
OK.

4
00:00:13,320 --> 00:00:19,340
So in this case the value of this name string variable is animal space mean the money.

5
00:00:19,500 --> 00:00:27,870
But here I am specifying that in case the value of this name string variable is animal one here I am

6
00:00:27,870 --> 00:00:29,520
just typing this through each.

7
00:00:29,640 --> 00:00:33,750
That said Taste of animal name is animal one and break.

8
00:00:33,960 --> 00:00:36,990
So let's actually run our project and see what happens.

9
00:00:36,990 --> 00:00:41,450
So as you can see here our application is is running on this emulator here.

10
00:00:41,610 --> 00:00:46,750
So if we actually click on this start the search button here let's see what happens.

11
00:00:48,040 --> 00:00:49,870
You can see nothing is happening here.

12
00:00:50,020 --> 00:00:50,890
So why.

13
00:00:50,890 --> 00:00:57,740
Because here I actually specified that the value of this name string variable is animal one.

14
00:00:57,850 --> 00:01:00,650
And in this suchit statement I am spit.

15
00:01:00,670 --> 00:01:05,860
I am actually switching between the values of this name string variable.

16
00:01:05,890 --> 00:01:06,960
OK.

17
00:01:06,970 --> 00:01:14,710
And here I am telling the computer that in case the value of this name string valuable is animal 1 please

18
00:01:14,770 --> 00:01:17,020
execute this line of code here.

19
00:01:17,270 --> 00:01:17,610
OK.

20
00:01:17,620 --> 00:01:21,450
And then break out of this switch statement.

21
00:01:21,460 --> 00:01:28,720
So now let's actually change the value of this name string variable to animal one and let's actually

22
00:01:28,720 --> 00:01:32,220
run our project again and see what happens.

23
00:01:32,230 --> 00:01:32,750
OK.

24
00:01:32,860 --> 00:01:36,170
Now our application is running on this emulator.

25
00:01:36,280 --> 00:01:38,120
So let's actually click on this.

26
00:01:38,140 --> 00:01:40,160
Starts the switch button here.

27
00:01:40,750 --> 00:01:48,160
As you can see it says our animal name is animal one so it is now executing this line of code here.

28
00:01:48,160 --> 00:01:48,600
Why.

29
00:01:48,640 --> 00:01:53,420
Because this value is the same as the value of this name string variable.

30
00:01:53,700 --> 00:01:54,230
OK.

31
00:01:54,340 --> 00:02:03,250
So let me actually explain to you once again that in line 63 I created a value but of types 3 and called

32
00:02:03,250 --> 00:02:04,230
names 3.

33
00:02:04,450 --> 00:02:06,910
And I assign a value to a variable.

34
00:02:07,330 --> 00:02:14,920
And in line 65 I actually created a switch statement and inside Apprentice's of this switch statement

35
00:02:15,490 --> 00:02:24,820
I am actually specifying that we are going to switch between the values of these names string variable.

36
00:02:25,040 --> 00:02:27,170
OK so each name string.

37
00:02:27,340 --> 00:02:34,570
So now we're actually inside of the switch statement and here I am actually saying that in case the

38
00:02:34,570 --> 00:02:42,480
value of these names thing valuable is animal Vonne Please execute this line of code here takes the

39
00:02:42,500 --> 00:02:46,230
switch that said text or animal name is animal.

40
00:02:46,420 --> 00:02:48,710
So let's actually create another case.

41
00:02:48,820 --> 00:02:54,090
So case and then again just putting a value of types strange.

42
00:02:54,250 --> 00:02:59,220
So for example the name of our animal is lion.

43
00:03:00,270 --> 00:03:01,030
OK.

44
00:03:01,480 --> 00:03:09,100
And then I need you I need to put in a call on here and now I can just take anti-X the switch that said

45
00:03:09,100 --> 00:03:14,400
text and then say that prentices again just put into double codes.

46
00:03:14,430 --> 00:03:16,730
And now again just typing the name

47
00:03:19,730 --> 00:03:28,290
of any man is lawyer OK.

48
00:03:28,470 --> 00:03:29,220
And now I own it.

49
00:03:29,250 --> 00:03:36,210
And then I need to actually put in the break statement here in order to break out of these are a switch

50
00:03:36,210 --> 00:03:37,290
statement.

51
00:03:37,290 --> 00:03:41,270
So let's actually run our project and see what happens.

52
00:03:41,280 --> 00:03:41,770
OK.

53
00:03:41,820 --> 00:03:45,890
Now our application is actually running on the simulator here.

54
00:03:46,020 --> 00:03:47,570
So let's actually click on this.

55
00:03:47,580 --> 00:03:51,970
Start the search button here and see what happens.

56
00:03:52,020 --> 00:03:55,010
Our animal name is animal one.

57
00:03:55,290 --> 00:03:55,830
OK.

58
00:03:55,890 --> 00:04:01,870
So because the value of this name string valuable is animal one is going to actually go inside of this

59
00:04:01,870 --> 00:04:08,400
switch statement because inside of this prentices I specify that I want to switch between the values

60
00:04:08,670 --> 00:04:10,620
of these name string variable.

61
00:04:10,710 --> 00:04:16,500
So it is now going to actually go inside of this switch statement and then it can actually execute these

62
00:04:16,500 --> 00:04:17,580
lines of code here.

63
00:04:17,790 --> 00:04:24,720
So here I am actually saying the computer that in case the value of this name string variable is animal

64
00:04:24,720 --> 00:04:27,080
one executes this line of code here.

65
00:04:27,360 --> 00:04:33,750
And in case the value of this name string variable is line execute this line of code.

66
00:04:33,870 --> 00:04:40,890
So because the value of these names thing valuable is animal one it is now executing this line of code

67
00:04:40,890 --> 00:04:43,860
the key or animal name is animal one.

68
00:04:44,040 --> 00:04:44,590
OK.

69
00:04:44,850 --> 00:04:51,340
So let's actually change the value of this name string valuable to Lion and let's see what happens.

70
00:04:53,610 --> 00:04:54,060
OK.

71
00:04:54,090 --> 00:04:55,630
Our application is ready.

72
00:04:55,890 --> 00:04:57,320
So let's actually click on this.

73
00:04:57,330 --> 00:04:59,520
Start the switch button here.

74
00:04:59,910 --> 00:05:04,090
As you can see it says the name of our animal is lion.

75
00:05:04,470 --> 00:05:08,050
OK so now it is actually executing this line of code.

76
00:05:08,220 --> 00:05:10,130
The name of our animal is lion.

77
00:05:10,460 --> 00:05:11,130
OK.

78
00:05:11,400 --> 00:05:13,450
So hopefully that makes sense.

79
00:05:13,480 --> 00:05:21,120
And now let's actually now we want to actually specify that if you don't put this break statement here

80
00:05:21,420 --> 00:05:28,590
it is going to actually execute the other lines of code after this case here.

81
00:05:28,590 --> 00:05:35,310
OK so if I actually delete this break statement here it is now going to actually consider that in case

82
00:05:35,370 --> 00:05:39,570
the value of our names thrain is animal one execute this line of code.

83
00:05:39,850 --> 00:05:40,370
OK.

84
00:05:40,440 --> 00:05:44,940
And it is not going to actually break out of this switch statement.

85
00:05:45,120 --> 00:05:50,430
And that again is going to actually execute this case statement here is going out and executed these

86
00:05:50,430 --> 00:05:52,010
lines of code here too.

87
00:05:52,020 --> 00:05:58,170
So now and then it's going to actually look inside the value of this names names string variable.

88
00:05:58,200 --> 00:06:04,560
And if the value of that name string variable is Lion it is actually going to execute this line of code

89
00:06:04,560 --> 00:06:09,210
here and then it is going to actually break out of this switch statement.

90
00:06:09,240 --> 00:06:18,090
OK we have another case default and here we are actually it is the same as the else part of our if else

91
00:06:18,090 --> 00:06:18,890
statements.

92
00:06:18,930 --> 00:06:28,110
And this does mean that if the value of these names thing valuable is not of animal van and it is also

93
00:06:28,200 --> 00:06:36,420
not lion and that he I can't just put in another value to the switch that said text.

94
00:06:36,420 --> 00:06:44,910
And inside the apprentice's I can just put into double quotes and I can just type in the name of our

95
00:06:45,720 --> 00:06:51,530
animal is something else.

96
00:06:53,840 --> 00:06:58,000
OK so now let's actually on our project and see what happens.

97
00:06:58,140 --> 00:06:58,490
OK.

98
00:06:58,500 --> 00:07:02,070
Now as you can see here our application is running on this emulator.

99
00:07:02,160 --> 00:07:08,220
So if we actually click on this starts to switch in here as you can see it says the name of our animal

100
00:07:08,220 --> 00:07:08,720
is Lion.

101
00:07:08,730 --> 00:07:09,510
Why.

102
00:07:09,510 --> 00:07:15,000
Because as you can see the value of this name string variable is lion.

103
00:07:15,330 --> 00:07:18,810
And let's actually change this value to something else.

104
00:07:18,810 --> 00:07:20,740
For example a l.

105
00:07:21,420 --> 00:07:24,660
And let's actually do our project and see what happens.

106
00:07:25,160 --> 00:07:27,640
OK so now let's actually click on this.

107
00:07:27,660 --> 00:07:34,140
Start the switch button here and it says the name of our animal is something else.

108
00:07:34,340 --> 00:07:34,960
OK.

109
00:07:35,130 --> 00:07:39,250
So it is going to actually execute the switch statement here.

110
00:07:39,420 --> 00:07:46,800
And then it can actually see that whether the value of these names thing variable is animal Vonne it

111
00:07:46,800 --> 00:07:48,880
is going to execute this line of code.

112
00:07:49,140 --> 00:07:55,350
And if the value of our names in variable is lying it is going to execute the design of code and then

113
00:07:55,350 --> 00:08:01,610
break out of the switch statement and that it is going to execute the other lines of code below this

114
00:08:01,660 --> 00:08:02,580
switch statement.

115
00:08:02,580 --> 00:08:03,310
OK.

116
00:08:03,720 --> 00:08:10,740
And the it is different means that if the value of these are names thing valuable is not anymore one

117
00:08:10,830 --> 00:08:15,150
or it is not a line it is going to actually execute this line of code.

118
00:08:15,150 --> 00:08:15,660
OK.

119
00:08:15,780 --> 00:08:22,310
This is like the the last part of of the IF statements that we saw in previous tutorials.

120
00:08:22,370 --> 00:08:23,220
OK.

121
00:08:23,460 --> 00:08:25,400
So hopefully that makes sense.

122
00:08:25,440 --> 00:08:26,310
Ok everyone.

123
00:08:26,310 --> 00:08:31,810
Now I want to talk about the break statement and the continue statement.

124
00:08:31,830 --> 00:08:39,240
So first of all let me actually comment out these lines of quote here because I don't want to actually

125
00:08:39,240 --> 00:08:42,350
execute these lines of code here.

126
00:08:42,600 --> 00:08:43,130
OK.

127
00:08:43,210 --> 00:08:49,080
And let's actually go inside these between loops that sit and listen and Meffert.

128
00:08:49,530 --> 00:08:52,620
And now let's actually create another full loop here.

129
00:08:52,630 --> 00:08:52,990
OK.

130
00:08:53,100 --> 00:08:55,040
So I just need to type in here for.

131
00:08:55,530 --> 00:09:00,260
And then inside Apprentice's first I need to actually specify the initial value.

132
00:09:00,270 --> 00:09:05,120
So int for example x assignment operator zero.

133
00:09:05,520 --> 00:09:06,140
OK.

134
00:09:06,600 --> 00:09:12,270
Until X is less than for example number 30 semicolon.

135
00:09:12,300 --> 00:09:16,340
And here I can just type in X plus plus.

136
00:09:16,530 --> 00:09:17,180
OK.

137
00:09:17,310 --> 00:09:22,550
And then I need to actually open and close my full loop by using these curly braces.

138
00:09:22,850 --> 00:09:23,570
OK.

139
00:09:24,090 --> 00:09:28,890
So now I want to actually talk about the larger class.

140
00:09:28,930 --> 00:09:32,900
OK so now I just need to defend to the name of the class lug.

141
00:09:33,090 --> 00:09:35,260
That's right.

142
00:09:35,990 --> 00:09:36,490
OK.

143
00:09:36,720 --> 00:09:43,550
So first of all I just need to put it into double quotes here and inside of double quotes just typing

144
00:09:43,980 --> 00:09:45,240
l o g.

145
00:09:45,530 --> 00:09:46,100
OK.

146
00:09:46,380 --> 00:09:47,700
Comma.

147
00:09:48,120 --> 00:09:51,240
So remember that characters of this lot.

148
00:09:51,250 --> 00:09:53,300
What here is is uppercase.

149
00:09:53,310 --> 00:09:53,870
OK.

150
00:09:54,030 --> 00:09:57,000
And then I can just typing x.

151
00:09:57,200 --> 00:09:57,790
OK.

152
00:09:58,020 --> 00:10:05,460
And then I can just refer to the name of this variable here because I want to actually output the value

153
00:10:05,460 --> 00:10:08,990
of these x variable to their lock.

154
00:10:09,150 --> 00:10:13,950
OK so I just need to put in a semi-colon here.

155
00:10:14,250 --> 00:10:16,290
And as you can see here is nationally as an error.

