1
00:00:00,420 --> 00:00:04,750
So first year plus four is 44 OK.

2
00:00:05,600 --> 00:00:13,480
And in line 47 I decided to actually output the value of this second variable to the concert.

3
00:00:13,560 --> 00:00:14,540
As you can see here.

4
00:00:14,640 --> 00:00:15,180
OK.

5
00:00:15,300 --> 00:00:17,600
This is the value of the second value.

6
00:00:17,610 --> 00:00:18,080
OK.

7
00:00:18,120 --> 00:00:26,810
So in light eight as you can see I decided to add value to my first variable.

8
00:00:27,000 --> 00:00:32,250
So this is how I actually assigned a value to my first variable.

9
00:00:32,610 --> 00:00:41,400
I decided to actually subtract 10 values from the value of my first variable and then I actually assigned

10
00:00:41,790 --> 00:00:45,410
the result of this operation here to my first variable.

11
00:00:45,420 --> 00:00:46,890
OK.

12
00:00:47,130 --> 00:00:52,990
So as you can see here the value of the first variable is fretty for now.

13
00:00:53,010 --> 00:00:53,350
OK.

14
00:00:53,370 --> 00:00:59,190
Because of this because of this expression here the value of the first of is 44.

15
00:00:59,330 --> 00:00:59,970
Okay.

16
00:01:00,330 --> 00:01:06,700
And in this line of code I want to subtract 10 values from the value of my first variable.

17
00:01:06,810 --> 00:01:07,370
OK.

18
00:01:07,580 --> 00:01:14,920
In line forty eight or you want to subtract 10 values from the value of my first variable.

19
00:01:15,140 --> 00:01:22,260
Ok so 54 minus 10 is 24.

20
00:01:22,420 --> 00:01:23,120
OK.

21
00:01:23,520 --> 00:01:31,240
And in line 49 I decided to out food the value of my first valuable to the console.

22
00:01:31,500 --> 00:01:37,090
So as you can see here in the console this is the value of my first value 24.

23
00:01:37,230 --> 00:01:37,790
OK.

24
00:01:38,010 --> 00:01:43,600
So be sure to practice this skill that I actually teach you in these lessons.

25
00:01:43,620 --> 00:01:44,270
OK.

26
00:01:44,430 --> 00:01:50,610
So now I want to show you some other examples about actually assigning values to your valuables.

27
00:01:50,610 --> 00:01:55,800
So first let me actually comment out these lines of code here because I don't because I don't want to

28
00:01:55,800 --> 00:01:56,730
execute them.

29
00:01:56,880 --> 00:01:57,560
OK.

30
00:01:58,200 --> 00:02:00,840
So I just create a multi-line comment.

31
00:02:00,840 --> 00:02:03,250
Again I want to create free variables here.

32
00:02:03,270 --> 00:02:03,770
OK.

33
00:02:03,900 --> 00:02:11,350
So the data type of my first variable is int and the name of my first variable is for example First

34
00:02:11,350 --> 00:02:13,470
the number.

35
00:02:13,560 --> 00:02:14,020
OK.

36
00:02:14,040 --> 00:02:17,040
And then I don't assign any value to my variable here.

37
00:02:17,130 --> 00:02:17,980
OK.

38
00:02:18,540 --> 00:02:21,210
And I want to create another variable here.

39
00:02:21,210 --> 00:02:26,140
So the data type of my variable here is in the name of my variable.

40
00:02:26,160 --> 00:02:31,700
Is second number.

41
00:02:32,760 --> 00:02:36,240
And then at the end of my statement I need to put in a semi-colon.

42
00:02:36,300 --> 00:02:37,010
OK.

43
00:02:37,440 --> 00:02:43,920
Again I want to create another variable so the data type of my variable is in it and the name of my

44
00:02:43,920 --> 00:02:48,280
variable would be first numbers.

45
00:02:48,330 --> 00:02:48,950
OK.

46
00:02:50,310 --> 00:02:52,950
And I don't assign any value to my variable here.

47
00:02:52,950 --> 00:02:54,840
OK so now.

48
00:02:54,930 --> 00:02:59,160
So now you want to actually assign a value to my first number variable.

49
00:02:59,200 --> 00:02:59,800
OK.

50
00:02:59,970 --> 00:03:06,720
So I just need to refer to the name of my first number variable and then I can actually assign a value

51
00:03:06,720 --> 00:03:07,920
to my variable.

52
00:03:07,920 --> 00:03:10,220
For example number 50.

53
00:03:10,340 --> 00:03:10,800
OK.

54
00:03:10,860 --> 00:03:14,370
And then at the end of my statement I need to put in a semicolon OK.

55
00:03:14,670 --> 00:03:23,280
So now I want to actually output the value of my variable to the console system that's out that creates.

56
00:03:23,490 --> 00:03:29,760
And then inside Apprentice's I need to refer to the name of my valuable first number and at the end

57
00:03:29,760 --> 00:03:32,230
of my statement I need to put in a semicolon.

58
00:03:32,610 --> 00:03:37,960
So if I run my project now as you can see it's going to output this values to the consulate number 50.

59
00:03:38,080 --> 00:03:45,830
OK so now I want to actually assign a value to my search number variable.

60
00:03:45,840 --> 00:03:50,480
So again I need to refer to the name of my search engine number variable.

61
00:03:50,760 --> 00:03:57,560
Ok I use the autocomplete feature of the eclipse in order to help me write my code faster.

62
00:03:57,570 --> 00:03:58,180
OK.

63
00:03:58,440 --> 00:03:59,410
Second number.

64
00:03:59,640 --> 00:04:02,460
And then I assign a value to my valuable here.

65
00:04:02,460 --> 00:04:02,920
OK.

66
00:04:03,030 --> 00:04:09,610
So you want to actually assign the value of my first number variable to my second number value.

67
00:04:09,840 --> 00:04:13,810
So here I just need to refer to the name of my first number of variables.

68
00:04:13,920 --> 00:04:20,570
As you can see and here I need to put a semi-colon at the end of my statement and I want to actually

69
00:04:20,580 --> 00:04:27,930
output the value of this variable to the console system that out that prints land and the inside Apprentice's

70
00:04:27,960 --> 00:04:30,340
I need to refer to the name of my value.

71
00:04:30,350 --> 00:04:33,250
But the second number.

72
00:04:33,270 --> 00:04:34,230
OK.

73
00:04:35,550 --> 00:04:42,900
So now if I run my project as you can see it's going to actually again outputs this value to the console

74
00:04:42,900 --> 00:04:43,230
OK.

75
00:04:43,260 --> 00:04:45,860
This is the value of my second number.

76
00:04:45,990 --> 00:04:46,370
OK.

77
00:04:46,410 --> 00:04:53,220
So I assigned the value of the first number to my second number and in line 59 I actually decided to

78
00:04:53,220 --> 00:04:55,150
output this value to the consulate.

79
00:04:55,230 --> 00:05:02,620
So now let me actually put the increment operator at the end of my first number of valuable plus plus.

80
00:05:03,000 --> 00:05:04,190
OK.

81
00:05:04,530 --> 00:05:09,200
And now you want to actually assign a value to my first number variable.

82
00:05:09,210 --> 00:05:15,630
So I just need to refer to the name of my first number variable and then I can assign a value to my

83
00:05:15,630 --> 00:05:16,740
first number variable.

84
00:05:16,740 --> 00:05:22,850
So now you want to actually put the increment operator before the name of my variable.

85
00:05:23,010 --> 00:05:26,240
So plus plus first number.

86
00:05:26,250 --> 00:05:26,950
OK.

87
00:05:27,270 --> 00:05:30,360
And then at the end of my statement I need to put in a semicolon.

88
00:05:30,690 --> 00:05:37,880
So now I want to output the value of this variable to the console system that out that print line.

89
00:05:38,280 --> 00:05:43,620
And then inside Apprentice's I just need to refer to the name of my variable for number and at the end

90
00:05:43,620 --> 00:05:48,490
of my statement I need to put in a semi-colon in order to make the eclipse happy.

91
00:05:48,510 --> 00:05:50,460
And as you can see the error is now gone.

92
00:05:50,520 --> 00:05:51,100
OK.

93
00:05:51,300 --> 00:05:57,270
So this is very important that you always end your statements with the semi-colon OK.

94
00:05:57,720 --> 00:06:04,740
So now if I on my project it's going to show me some different results because of the difference between

95
00:06:05,000 --> 00:06:07,660
our prefix and postfix operations.

96
00:06:07,720 --> 00:06:11,570
OK so now let me actually run my project and see what happens.

97
00:06:11,580 --> 00:06:12,270
OK.

98
00:06:12,660 --> 00:06:17,450
So as you can see here it's going to output these free values to the console OK.

99
00:06:17,790 --> 00:06:23,090
So the first one is the result of execution of this line of code as you can see here.

100
00:06:23,340 --> 00:06:31,550
And the second value as you can see here this value is the result of execution of this line of code.

101
00:06:31,880 --> 00:06:37,870
And at the first value as you can see here is the result of execution of this line of code here.

102
00:06:37,890 --> 00:06:38,590
OK.

103
00:06:38,760 --> 00:06:43,530
So when you use postfix operators on a variable in an expression.

104
00:06:43,560 --> 00:06:49,150
So as you can see here are used these postfix operator on this first number variable here.

105
00:06:49,150 --> 00:06:49,620
OK.

106
00:06:49,650 --> 00:06:54,790
So when you use postfix operators on a variable in an expression.

107
00:06:54,840 --> 00:06:56,900
So as you can see here this is an expression.

108
00:06:56,910 --> 00:06:57,410
OK.

109
00:06:57,540 --> 00:07:00,980
This line of code is an expression because it conveys a value.

110
00:07:01,140 --> 00:07:01,690
OK.

111
00:07:01,800 --> 00:07:03,560
As I told you before.

112
00:07:03,690 --> 00:07:04,290
OK.

113
00:07:04,470 --> 00:07:12,720
When you use postfix operators on a variable in an expression their variables value is evaluated in

114
00:07:12,720 --> 00:07:16,850
the expression before it is incremented or decremented.

115
00:07:17,190 --> 00:07:17,770
OK.

116
00:07:17,900 --> 00:07:23,300
Inlight fifty eight I decided to actually add a value to my value.

117
00:07:23,310 --> 00:07:30,780
But as you can see I actually referred to the name of my first number variable and at the end of my

118
00:07:31,290 --> 00:07:34,300
variable name I put an increment operator here.

119
00:07:34,320 --> 00:07:35,160
OK.

120
00:07:35,550 --> 00:07:38,550
As you can see here this is the postfix operator.

121
00:07:38,610 --> 00:07:41,020
I put the postfix operator here as you can see here.

122
00:07:41,040 --> 00:07:43,980
OK this is the increment operator OK.

123
00:07:44,550 --> 00:07:48,340
And then I assigned this value to the second number value.

124
00:07:49,450 --> 00:07:57,400
So when you use postfix operators on a value bet in an expression the variables value is evaluated in

125
00:07:57,400 --> 00:08:00,760
the expression before it is incremented or decremented.

126
00:08:00,820 --> 00:08:01,580
OK.

127
00:08:01,900 --> 00:08:08,520
So as you can see here this value here is the result of actually executing design of code here.

128
00:08:08,560 --> 00:08:09,250
OK.

129
00:08:09,670 --> 00:08:15,200
But this value is the same as the value of my first number.

130
00:08:15,610 --> 00:08:19,020
When I actually assigned a value to my first number OK.

131
00:08:19,090 --> 00:08:25,730
So here I actually put an increment operator here in order to add 1 value to this first number value.

132
00:08:25,740 --> 00:08:31,550
But but because I used the postfix operator on the first number are valuable here.

133
00:08:31,750 --> 00:08:39,350
OK this variable value is evaluated in the expression before it is incremented or decremented.

134
00:08:39,460 --> 00:08:45,460
So here because I use the postfix operator on my first number variable.

135
00:08:45,690 --> 00:08:46,520
OK.

136
00:08:47,050 --> 00:08:53,560
It's not going to actually increment the value of this variable and then assign this value to my second

137
00:08:53,560 --> 00:08:54,430
variable.

138
00:08:54,550 --> 00:09:00,580
It's going to actually assign the value of this first number variable to my second number variable.

139
00:09:00,610 --> 00:09:06,730
And then after that assignment it's going to actually increment the value of this first number variable

140
00:09:06,910 --> 00:09:07,450
by 1.

141
00:09:07,480 --> 00:09:11,970
OK because I use the postfix operator this happened.

142
00:09:12,160 --> 00:09:20,830
So let me actually explain once again because I used the because I used the postfix operator on my first

143
00:09:20,830 --> 00:09:22,390
number variable here.

144
00:09:22,690 --> 00:09:29,890
OK the value of this first number of valuable will be assigned to second number variable and then it's

145
00:09:29,890 --> 00:09:34,430
going to actually increment the value of this first number variable by 1.

146
00:09:34,480 --> 00:09:40,690
Ok so now as you can see it's going to actually assign the value of this first number variable which

147
00:09:40,690 --> 00:09:43,910
is 50 to my second number variable.

148
00:09:43,910 --> 00:09:49,340
And then it's going to actually increment that value by 1.

149
00:09:49,730 --> 00:09:50,280
OK.

