1
00:00:00,300 --> 00:00:05,590
Hire everyone in this theater all I'm going to go ahead and actually talk about little else.

2
00:00:05,610 --> 00:00:06,230
OK.

3
00:00:06,330 --> 00:00:09,180
So first we need to create a Java project.

4
00:00:09,180 --> 00:00:13,150
Just click on this flight Neil and then click on Java project.

5
00:00:13,170 --> 00:00:13,810
OK.

6
00:00:14,040 --> 00:00:21,640
So for the project name just type in here literals AJ and then click on finish.

7
00:00:21,980 --> 00:00:26,890
So as you can see here our project is now created and we need a class.

8
00:00:26,900 --> 00:00:27,570
OK.

9
00:00:27,800 --> 00:00:33,710
So click on this file new and then click on class for the class name.

10
00:00:33,770 --> 00:00:41,520
Just type in here Ledermann and for the package name as you know we need our reverse domain here.

11
00:00:41,600 --> 00:00:43,640
So com that mortiser

12
00:00:46,060 --> 00:00:46,740
OK.

13
00:00:47,050 --> 00:00:53,710
And then at the end of our practice at the end of our package name we need to actually put the project

14
00:00:53,710 --> 00:00:59,590
name which leaders and for the modifiers choose public.

15
00:00:59,800 --> 00:01:06,020
And here check this check box here that says public static void main method.

16
00:01:06,040 --> 00:01:06,540
OK.

17
00:01:06,610 --> 00:01:10,780
This is our starting point for running our job code.

18
00:01:10,810 --> 00:01:11,710
OK.

19
00:01:11,800 --> 00:01:16,810
So just click on this finish and here our class is created.

20
00:01:16,810 --> 00:01:23,360
So first let me read this a comment here and then I want to make this a little area.

21
00:01:23,380 --> 00:01:23,900
OK.

22
00:01:24,100 --> 00:01:29,580
So as I said earlier in the section you need to double click on this.

23
00:01:29,780 --> 00:01:31,420
Job I have here.

24
00:01:31,740 --> 00:01:32,120
OK.

25
00:01:32,200 --> 00:01:35,570
As you can see my editor area is now wider.

26
00:01:35,740 --> 00:01:38,370
OK so now I'm going to talk about leaders.

27
00:01:38,380 --> 00:01:40,000
OK.

28
00:01:40,600 --> 00:01:48,250
And here first let me point out that Java has several integer literals.

29
00:01:48,280 --> 00:01:52,430
So for example this ain't valuable here.

30
00:01:52,480 --> 00:01:58,960
The name of the variable i choose integer integer value.

31
00:01:58,970 --> 00:02:03,700
OK and I assigned the number five to my value.

32
00:02:03,700 --> 00:02:11,640
But as you can see this number five is a value that I can assign to this integer variable here.

33
00:02:11,800 --> 00:02:12,410
OK.

34
00:02:12,640 --> 00:02:19,530
In terms of literals this number phi is an integer the rule of the Ain't valuable type.

35
00:02:19,660 --> 00:02:28,960
OK this variable can also be assigned to bite and short variable's because this number is small enough

36
00:02:29,530 --> 00:02:32,110
to fit into those integer types.

37
00:02:32,110 --> 00:02:40,770
So for example if I want to create another variable here be the data type of short as you can see here.

38
00:02:41,350 --> 00:02:44,280
And the name of my variable would be short.

39
00:02:44,410 --> 00:02:46,010
Value.

40
00:02:46,230 --> 00:02:49,690
And then I can assign this value to my body.

41
00:02:49,740 --> 00:02:50,290
OK.

42
00:02:50,430 --> 00:02:59,320
Because these are number five here of this value is small enough to fit into this short data.

43
00:02:59,340 --> 00:03:06,550
Ok here I can actually create another variable with a data type of byte as you can see here.

44
00:03:06,630 --> 00:03:12,780
And for the valuable names I can just type in here byte value.

45
00:03:13,150 --> 00:03:14,020
OK.

46
00:03:14,160 --> 00:03:21,360
And then I can assign the number five to my variable here because this number again this number 5 is

47
00:03:21,480 --> 00:03:25,220
small enough to fit into these integer types.

48
00:03:25,320 --> 00:03:25,960
OK.

49
00:03:27,120 --> 00:03:32,280
So this number 5 is an integer that all of the variable here.

50
00:03:32,350 --> 00:03:32,580
OK.

51
00:03:32,580 --> 00:03:34,030
As you can see.

52
00:03:34,890 --> 00:03:36,010
OK.

53
00:03:37,050 --> 00:03:40,150
So here let me show you another example.

54
00:03:40,470 --> 00:03:45,120
For example Lanc the right type of my variable is long OK.

55
00:03:45,330 --> 00:03:51,360
And the name of my variable with the number of balls.

56
00:03:51,610 --> 00:03:52,550
OK.

57
00:03:52,800 --> 00:03:56,680
Now I can assign the value 1 to my value then.

58
00:03:56,790 --> 00:03:57,690
OK.

59
00:03:57,960 --> 00:04:06,300
So here if I want to output the value of this number of balls variable to the console I just need to

60
00:04:06,300 --> 00:04:15,210
type in here system that out that princeling and that inside Apprentice's I just need to refer to the

61
00:04:15,210 --> 00:04:19,920
name of the variable number of balls.

62
00:04:20,890 --> 00:04:28,510
And here I use the autocomplete feature of the eclipse to actually help me write the variable name and

63
00:04:28,600 --> 00:04:31,770
at the end of your statement just put a semi-colon.

64
00:04:31,840 --> 00:04:32,570
OK.

65
00:04:32,770 --> 00:04:38,600
So here I want to actually let you know another point about Eclipse.

66
00:04:38,650 --> 00:04:46,810
As you can see this star symbol here is now appearing beside the name of my class.

67
00:04:46,840 --> 00:04:58,000
OK so now if I want if I actually save my project by pressing on the common plus the s key on my keyboard

68
00:04:58,450 --> 00:04:59,530
I can save my project.

69
00:04:59,560 --> 00:05:12,610
OK so now let me actually create a comment here for maximizers Pakhi in order to save your project just

70
00:05:12,820 --> 00:05:19,380
actually press on common key.

71
00:05:20,360 --> 00:05:25,240
Plus the key on your keyboard.

72
00:05:25,700 --> 00:05:27,780
In order to save your your project.

73
00:05:27,830 --> 00:05:33,880
So let me now say if my project and as you can see here this star here is now gone.

74
00:05:34,000 --> 00:05:35,000
OK.

75
00:05:35,270 --> 00:05:40,130
So this is how you say your project in Mac for Windows users

76
00:05:43,710 --> 00:05:44,830
for Windows users.

77
00:05:46,500 --> 00:05:55,570
Just press on control key it plus the s key on your keyboard.

78
00:05:55,680 --> 00:05:56,310
OK.

79
00:05:56,520 --> 00:06:00,160
So this is how you say your project are in Eclipse.

80
00:06:00,290 --> 00:06:00,910
OK.

81
00:06:01,960 --> 00:06:11,650
So another point that you actually talk about here is for example if I want to actually add another

82
00:06:11,650 --> 00:06:15,330
value to the number of balls are valuable here.

83
00:06:15,520 --> 00:06:22,450
So as you know I can assign another value to this or to this valuable here because this is not a constant.

84
00:06:22,480 --> 00:06:24,620
So it's just a regular variable.

85
00:06:24,640 --> 00:06:26,030
This is not a constant.

86
00:06:26,090 --> 00:06:29,710
OK so I can't assign another value to this variable.

87
00:06:29,950 --> 00:06:33,610
So I just need to refer to the name of my variable again.

88
00:06:33,730 --> 00:06:41,020
I actually use the autocomplete feature of the eclipse and then as you can see here I referred to the

89
00:06:41,020 --> 00:06:42,440
name of my variable.

90
00:06:42,790 --> 00:06:47,770
And again I want to actually assign another value to this variable.

91
00:06:47,920 --> 00:06:56,170
So I just type in here the name of my variable OK plus the number 40.

92
00:06:56,370 --> 00:06:57,250
OK.

93
00:06:57,740 --> 00:07:01,200
So as you can see here you may ask that what's going on here.

94
00:07:01,280 --> 00:07:01,970
OK.

95
00:07:02,150 --> 00:07:08,930
So now as I said earlier in the section this is not an equal operator OK.

96
00:07:09,320 --> 00:07:15,060
So here I referred to the name of my variable here in order to read its value.

97
00:07:15,130 --> 00:07:15,800
OK.

98
00:07:16,340 --> 00:07:19,880
So now as you can see this is number one here.

99
00:07:19,920 --> 00:07:20,100
OK.

100
00:07:20,150 --> 00:07:26,020
If you want to actually delete this variable name here and just put a number number one here.

101
00:07:26,150 --> 00:07:32,470
OK this is the same as if you want to for example put that name of my value.

102
00:07:32,480 --> 00:07:38,870
But what this is a good programming practice that you actually referred to the name of your valuables

103
00:07:39,440 --> 00:07:41,150
in order to return values.

104
00:07:41,180 --> 00:07:41,900
OK.

105
00:07:42,350 --> 00:07:49,140
So this is not good to actually heart code your values in your programs.

106
00:07:49,160 --> 00:07:49,830
OK.

107
00:07:50,120 --> 00:07:54,940
So I'll actually show you more examples about this concept later in this course.

108
00:07:54,950 --> 00:08:01,220
But for now just know that this number of balls here means I am referring to the invaluable name here.

109
00:08:01,250 --> 00:08:02,760
In order to read it's value.

110
00:08:02,830 --> 00:08:09,170
Ok here I am adding this number to the value of my variable here.

111
00:08:09,170 --> 00:08:09,910
OK.

112
00:08:10,340 --> 00:08:15,300
So let me actually run my project now.

113
00:08:16,100 --> 00:08:22,530
And as you can see here it outputs the value of this variable here to the console.

114
00:08:22,550 --> 00:08:25,380
OK the value of this variable here is number one.

115
00:08:25,570 --> 00:08:26,140
OK.

116
00:08:26,300 --> 00:08:31,980
As you can see here output the value of this valuable to the console here.

117
00:08:32,330 --> 00:08:38,230
OK let's see what happens system that out that land.

118
00:08:38,600 --> 00:08:47,460
And then inside Apprentice's I just say to refer to the name name of my valuable OK number of balls.

119
00:08:47,730 --> 00:08:51,470
And at the end of my statement I just need to put a semi-colon.

120
00:08:52,160 --> 00:08:59,350
So here if I run my project now it outputs the value of 41 to the console.

121
00:08:59,660 --> 00:09:02,350
OK so what happens here here.

122
00:09:02,690 --> 00:09:04,270
I actually created this value.

123
00:09:04,340 --> 00:09:04,890
OK.

124
00:09:04,970 --> 00:09:11,730
And here I decided to output the value of this value over to the console.

125
00:09:11,800 --> 00:09:12,520
OK.

126
00:09:12,800 --> 00:09:13,360
In this line.

127
00:09:13,430 --> 00:09:13,850
OK.

128
00:09:13,850 --> 00:09:22,670
And in the line 18 here as you can see here I added this number to the value of my value.

129
00:09:22,800 --> 00:09:24,280
OK which is number one.

130
00:09:24,350 --> 00:09:25,010
OK.

131
00:09:25,040 --> 00:09:31,530
And then I assign the result of this operation to my value.

132
00:09:31,550 --> 00:09:32,190
OK.

133
00:09:33,180 --> 00:09:37,900
And then I assign the result of this operation to my variable.

134
00:09:38,100 --> 00:09:41,340
So let me explain to you once again here.

135
00:09:41,430 --> 00:09:47,460
I actually added this number to the value of my body event which is number one.

136
00:09:47,490 --> 00:09:48,280
OK.

137
00:09:48,480 --> 00:09:53,830
I am referring to the name of my variable in order to lead its value.

138
00:09:54,090 --> 00:09:57,940
OK this is a very important point in programming.

