1
00:00:00,300 --> 00:00:09,840
So I cannot actually create another statement here or system that out that print slant as you can see

2
00:00:09,840 --> 00:00:16,550
here inside Apprentice's just put into double quotes and typing here Heidi for example.

3
00:00:16,560 --> 00:00:17,130
OK.

4
00:00:17,340 --> 00:00:20,220
And then I need to put in a semicolon at the end.

5
00:00:20,220 --> 00:00:26,730
And again if I run my program you can see that that is going to show me the high wire in the console

6
00:00:26,730 --> 00:00:27,290
area.

7
00:00:27,360 --> 00:00:27,990
OK.

8
00:00:28,410 --> 00:00:36,030
But if I comment out this line of code here with multi-line comments as you can see here and now if

9
00:00:36,030 --> 00:00:39,210
I run my project it's going to show us nothing.

10
00:00:39,240 --> 00:00:39,700
OK.

11
00:00:39,730 --> 00:00:48,090
Why why it's not showing us anything because I have commented out this statement here and this is statement

12
00:00:48,090 --> 00:00:48,530
here.

13
00:00:48,610 --> 00:00:49,330
OK.

14
00:00:49,710 --> 00:00:53,500
I have commented out this statement here with a single line comment.

15
00:00:53,520 --> 00:00:59,970
As you can see here and I have commented out this statement here with a multi-line comment.

16
00:01:00,060 --> 00:01:00,780
OK.

17
00:01:01,230 --> 00:01:09,900
So for example if I erase these delimiters here as you can see here and if I run my projects now it's

18
00:01:09,900 --> 00:01:12,120
going to show me the high text here.

19
00:01:12,240 --> 00:01:12,830
OK.

20
00:01:12,990 --> 00:01:20,570
Or if I delete these two slashes here and if I run my project again it's going to show me the hello

21
00:01:20,580 --> 00:01:22,330
text and the text.

22
00:01:22,590 --> 00:01:23,320
OK.

23
00:01:23,490 --> 00:01:25,740
So that's it for comments.

24
00:01:25,790 --> 00:01:28,710
And next I'm going to talk about variables.

25
00:01:28,800 --> 00:01:32,930
Variables are just placeholders for data in our program.

26
00:01:32,970 --> 00:01:33,450
OK.

27
00:01:33,600 --> 00:01:41,810
For example if I to create a variable in my program or first I need to specify the data type of my variable.

28
00:01:41,850 --> 00:01:44,400
For example the data type would be integer.

29
00:01:44,400 --> 00:01:45,050
OK.

30
00:01:45,630 --> 00:01:47,760
As you can see the data type of my variable.

31
00:01:47,760 --> 00:01:49,040
Is it integer.

32
00:01:49,060 --> 00:01:54,030
OK my variable is going to hold an integer number or a whole number.

33
00:01:54,030 --> 00:01:54,720
OK.

34
00:01:55,110 --> 00:01:57,900
And then I need to specify the name of my variable.

35
00:01:57,900 --> 00:01:59,420
For example numbers.

36
00:01:59,600 --> 00:02:00,240
OK.

37
00:02:00,450 --> 00:02:03,360
And that's enough for actually creating a variable.

38
00:02:03,360 --> 00:02:06,140
And at the end I just need to put in a semi-colon.

39
00:02:06,570 --> 00:02:09,420
And as you can see here my variable is now created.

40
00:02:09,570 --> 00:02:10,130
OK.

41
00:02:10,290 --> 00:02:14,560
And optionally I can assign a value to my variable here.

42
00:02:14,570 --> 00:02:16,410
For example number 20.

43
00:02:16,410 --> 00:02:17,020
OK.

44
00:02:17,250 --> 00:02:24,600
So as you can see here I assigned the value 20 as you can see here on the right hand side of the OPERATOR

45
00:02:24,870 --> 00:02:28,300
OK to the left hand side of the operator.

46
00:02:28,380 --> 00:02:31,980
OK so this is not an equal operator.

47
00:02:32,010 --> 00:02:39,630
This is just an assignment operator so you must actually consider that this is an assignment operator

48
00:02:39,630 --> 00:02:47,850
not an equal operator because we are assigning this value on the right hand side of the operator to

49
00:02:47,850 --> 00:02:53,410
the value on the left hand side of the OPERATOR OK so this is very important.

50
00:02:53,820 --> 00:02:57,690
Later I'll explain more about this assignment operator.

51
00:02:57,930 --> 00:03:06,540
But for now just know that this is an assignment operator assigning a value to our variable is called

52
00:03:06,810 --> 00:03:09,010
initialization of that value.

53
00:03:09,300 --> 00:03:14,220
So as you can see here we assigned a value to our variable.

54
00:03:14,220 --> 00:03:17,120
So we just initialize our variable.

55
00:03:17,400 --> 00:03:26,490
So for example if we want to declare another variable ok for example and another number into another

56
00:03:26,790 --> 00:03:33,590
number here I just declare my variable not initializing it.

57
00:03:33,780 --> 00:03:40,940
So as you can see here I didn't assign a value to my order number variable here.

58
00:03:40,950 --> 00:03:44,040
I just declared my variable OK.

59
00:03:44,490 --> 00:03:47,610
I didn't actually initialize my variable.

60
00:03:47,910 --> 00:03:49,290
I just declared it.

61
00:03:49,320 --> 00:03:50,210
OK.

62
00:03:50,220 --> 00:03:52,750
This is called the declaration of evaluation.

63
00:03:52,830 --> 00:03:58,510
Then you actually declare a variable and not initialising get.

64
00:03:58,530 --> 00:04:01,110
This is called declaration of a variable.

65
00:04:01,140 --> 00:04:01,950
OK.

66
00:04:02,430 --> 00:04:11,930
But in the case of number variable valuable as you can see here I declared and assign a value to my

67
00:04:11,940 --> 00:04:12,720
valuable.

68
00:04:12,960 --> 00:04:18,080
Or in other words I declared and initialized my body.

69
00:04:18,250 --> 00:04:18,820
OK.

70
00:04:18,870 --> 00:04:23,760
So this is called declarant and initializing a value.

71
00:04:23,790 --> 00:04:24,320
OK.

72
00:04:24,390 --> 00:04:31,490
So now I'm going to show you how you can actually output the value of your valuables to the console.

73
00:04:31,590 --> 00:04:32,350
OK.

74
00:04:32,550 --> 00:04:38,090
Now I want to output the value of this number variable to the console which is 20.

75
00:04:38,130 --> 00:04:38,840
OK.

76
00:04:39,240 --> 00:04:41,790
So let's see how we can do that.

77
00:04:41,850 --> 00:04:48,880
First we need to actually type in system that out that princeling.

78
00:04:49,130 --> 00:04:49,980
OK.

79
00:04:50,390 --> 00:04:56,480
And then inside Apprentice's we need to put into double codes and then inside the double quotes we need

80
00:04:56,480 --> 00:05:00,980
to actually put in our For example some text.

81
00:05:01,260 --> 00:05:05,670
And then we need to put the semi-colon at the end our statements.

82
00:05:05,700 --> 00:05:10,230
OK so now let's just run our project and see what happens.

83
00:05:10,230 --> 00:05:17,530
So as you can see here it's going to output this text in between these double codes.

84
00:05:17,610 --> 00:05:19,680
Ok to the console area.

85
00:05:19,700 --> 00:05:20,340
OK.

86
00:05:20,450 --> 00:05:23,110
You can access the concert area here.

87
00:05:23,280 --> 00:05:23,920
OK.

88
00:05:24,240 --> 00:05:32,500
So what I don't want just this text I want to actually output the value of this number of variables.

89
00:05:32,570 --> 00:05:33,450
OK.

90
00:05:33,490 --> 00:05:35,060
The de-value is 20.

91
00:05:35,070 --> 00:05:38,310
So how can I access the value of a variable.

92
00:05:38,520 --> 00:05:39,920
So now let me show you.

93
00:05:40,290 --> 00:05:42,770
So not just delete this subtext here.

94
00:05:43,080 --> 00:05:50,960
And in order to access the value of the variable we just need to refer to the name of that variable.

95
00:05:50,970 --> 00:05:51,560
OK.

96
00:05:51,900 --> 00:05:54,360
So this is the data type of value.

97
00:05:54,450 --> 00:05:55,000
OK.

98
00:05:55,200 --> 00:06:01,510
And this is the name of our variable and this is the value that we assigned to our variable.

99
00:06:01,530 --> 00:06:02,440
OK.

100
00:06:03,000 --> 00:06:10,890
So in order to access this value OK this value that you can see here we just need to refer to the name

101
00:06:10,890 --> 00:06:11,730
of that variable.

102
00:06:11,730 --> 00:06:12,600
Which is this.

103
00:06:12,770 --> 00:06:13,480
OK.

104
00:06:13,890 --> 00:06:22,760
So now I just need to type in here number and now I am referring to the name of this variable.

105
00:06:22,950 --> 00:06:31,200
So now if I click on this run button as you can see it's gonna output the value to 20 to the concert

106
00:06:31,200 --> 00:06:31,780
area.

107
00:06:31,890 --> 00:06:32,440
OK.

108
00:06:32,580 --> 00:06:33,550
So that's it.

109
00:06:33,630 --> 00:06:37,220
That's how you can actually access the value of a variable.

110
00:06:37,260 --> 00:06:37,800
OK.

111
00:06:37,890 --> 00:06:42,050
You just need to actually refer to the name of that variable.

112
00:06:42,330 --> 00:06:48,870
And as I said before if you don't have the console window open in your eclipse you just need to click

113
00:06:48,870 --> 00:06:54,860
on this window OK and show you and then click on cancel.

114
00:06:54,870 --> 00:06:55,400
OK.

115
00:06:55,540 --> 00:06:58,350
And now it's going to open the console window for me.

116
00:06:58,350 --> 00:06:59,020
OK.

117
00:06:59,430 --> 00:07:07,950
So another concept that I want to teach you here is that how you can actually use variables and texts

118
00:07:08,400 --> 00:07:09,420
together OK.

119
00:07:09,540 --> 00:07:14,630
For example if you want to go out with some text here it's going to show me an error.

120
00:07:14,700 --> 00:07:20,780
Ok so what's this error syntax error and talk and this text.

121
00:07:20,900 --> 00:07:21,640
Dystocia.

122
00:07:21,720 --> 00:07:28,050
So what should I do in order to output the value of this variable and the text between these two double

123
00:07:28,050 --> 00:07:30,660
quotes to the council area together.

124
00:07:30,740 --> 00:07:31,160
OK.

125
00:07:31,290 --> 00:07:39,150
So if I run my project now it's not showing me a pop up that says errors exist in required projects.

126
00:07:39,170 --> 00:07:42,470
Ok variables proceed with lunch.

127
00:07:42,480 --> 00:07:44,800
No I can't because there is error.

128
00:07:44,970 --> 00:07:50,130
Ok so you can't run your project as you can see here is it's the sign of error.

129
00:07:50,170 --> 00:07:55,020
Ok syntax error on talken the text it is torture.

130
00:07:55,050 --> 00:07:57,500
So what's the solution for this problem.

131
00:07:57,720 --> 00:07:58,320
OK.

132
00:07:58,560 --> 00:08:06,660
So in order to actually concatenate or Linge are valuable and it takes to get there in your programs

133
00:08:07,180 --> 00:08:13,870
you can just actually put a plus operator in between those actually values.

134
00:08:14,100 --> 00:08:17,050
For example as you can see here this is my number variable.

135
00:08:17,160 --> 00:08:18,060
OK.

136
00:08:18,420 --> 00:08:21,600
And I am using a plus operator here.

137
00:08:21,900 --> 00:08:24,770
And then we can actually use our text.

138
00:08:24,780 --> 00:08:30,210
So as you can see the error is gone and now I have I can run my project.

139
00:08:30,210 --> 00:08:32,480
So this is our values.

140
00:08:32,580 --> 00:08:36,420
This is the number 20 is the value of our variable.

141
00:08:36,540 --> 00:08:41,890
So and this text is the text between these two double quotes.

142
00:08:42,030 --> 00:08:48,570
So for example if I just put a space here and run my project now as you can see these two values are

143
00:08:48,570 --> 00:08:49,910
separated now.

144
00:08:50,340 --> 00:08:58,260
So for example if I want to actually concatenate or Linge to text together in my program I can just

145
00:08:58,720 --> 00:09:05,070
delete this number of variable and just put the double quotes and between these two double codes I can

146
00:09:05,070 --> 00:09:07,200
put my values for example values.

147
00:09:07,210 --> 00:09:07,650
OK.

148
00:09:07,680 --> 00:09:11,470
Everything that I want and then just run my project.

149
00:09:11,490 --> 00:09:18,180
And as you can see it's going to show me these values and the space as you can see this is the space

150
00:09:18,180 --> 00:09:19,950
here that I've put.

151
00:09:20,130 --> 00:09:20,650
OK.

152
00:09:21,210 --> 00:09:24,140
And the text between these two double quotes.

153
00:09:24,270 --> 00:09:25,110
OK.

154
00:09:25,620 --> 00:09:29,170
So that's it for concatenation in Java.

155
00:09:29,520 --> 00:09:33,810
So now let me show you another example of concatenation in Java.

156
00:09:34,080 --> 00:09:40,970
So in order to actually output some results to the console I just need to type in here again system

157
00:09:42,140 --> 00:09:49,850
that out that princeling and then inside the parentheses just put the double quotes instead of double

158
00:09:49,850 --> 00:09:51,260
quotes just type in your text.

159
00:09:51,260 --> 00:09:52,320
This is my text.

160
00:09:52,340 --> 00:09:52,490
OK.

161
00:09:52,550 --> 00:09:55,010
This is my example variable.

