1
00:00:01,730 --> 00:00:02,420
Hello everyone.

2
00:00:02,450 --> 00:00:08,000
So in this session we will learn about strategic properties have a glass let us take an example.

3
00:00:08,030 --> 00:00:10,250
So I have this glass student.

4
00:00:10,250 --> 00:00:12,710
So this student class has three public properties.

5
00:00:12,710 --> 00:00:14,980
Rule number eight and total student.

6
00:00:15,000 --> 00:00:19,290
So told to go inside the total number of students present in the class.

7
00:00:19,340 --> 00:00:19,800
OK.

8
00:00:19,850 --> 00:00:24,980
So whenever we create a new student what will happen the value of the industrial dance will be incremented

9
00:00:24,980 --> 00:00:29,610
by when initially we can assume that the value of total strawberry inside zero.

10
00:00:29,640 --> 00:00:30,160
Okay.

11
00:00:30,230 --> 00:00:31,640
So when we create an object

12
00:00:36,060 --> 00:00:44,190
to indicate an object student S1 what will happen all the three properties will be copied.

13
00:00:44,220 --> 00:00:48,960
So rule number age and told us twins

14
00:00:54,180 --> 00:00:59,610
now add this line default constructor in both to default constructor will be called.

15
00:00:59,640 --> 00:01:01,910
So rule number will contain garbage value.

16
00:01:01,920 --> 00:01:05,820
Age will contain garbage value and total students will contain garbage value.

17
00:01:05,850 --> 00:01:14,010
Similarly if I create and I the student student s do so again all these three properties will be copied.

18
00:01:14,170 --> 00:01:20,350
So student as to the number three surrenders to each and student test to total students

19
00:01:24,000 --> 00:01:30,430
so add this line in bold default constructively recorded serial number will contain garbage value.

20
00:01:30,450 --> 00:01:36,570
Age will contain garbage value and that older students will contain garbage will you see what's happening

21
00:01:36,570 --> 00:01:45,290
here is each student should average on the lumber each student should have its own age each student

22
00:01:45,410 --> 00:01:47,220
should have its own total student.

23
00:01:47,240 --> 00:01:48,070
Now this is wrong.

24
00:01:48,080 --> 00:01:49,960
This is a very weird statement.

25
00:01:49,970 --> 00:01:52,890
Okay so each student will have its own no no.

26
00:01:52,910 --> 00:01:53,840
This is correct.

27
00:01:53,840 --> 00:01:55,700
Each student will have it one each.

28
00:01:55,700 --> 00:01:59,550
This is also correct but each student will have its total student.

29
00:01:59,610 --> 00:02:01,380
Now this is kind of weird.

30
00:02:01,400 --> 00:02:02,910
It's a very weird statement.

31
00:02:03,140 --> 00:02:09,920
So the property told us to rent the property told us to rent this property is the combined property

32
00:02:09,920 --> 00:02:13,670
of all the students and it is not the property of a single student.

33
00:02:14,030 --> 00:02:18,150
Okay so the value of the student should be same for all the objects.

34
00:02:18,230 --> 00:02:20,090
It will never happen that forced to rent.

35
00:02:20,100 --> 00:02:25,490
That's when the value of the through interest then for us to total students are 20 and for a state or

36
00:02:25,490 --> 00:02:26,300
through a third party.

37
00:02:26,300 --> 00:02:27,620
It will never happen.

38
00:02:27,800 --> 00:02:33,080
So the value of this property the value of the total Australian property will be same as a number of

39
00:02:33,080 --> 00:02:34,550
students created.

40
00:02:34,580 --> 00:02:37,100
So this property does not belong to object.

41
00:02:37,100 --> 00:02:39,590
This property belongs to a class.

42
00:02:39,590 --> 00:02:45,950
Okay so the report the value of total US students at one place inside the class and whoever wants to

43
00:02:45,950 --> 00:02:51,060
access the to the student it will go and ask the class.

44
00:02:51,260 --> 00:02:58,170
Okay so the properties which belongs to a class will declare them static using the static guild.

45
00:02:58,220 --> 00:03:03,650
Okay so the properties which belongs to a class will declare them static using this tactic given before

46
00:03:03,650 --> 00:03:04,780
the integer.

47
00:03:05,040 --> 00:03:08,200
We will write static keyword before the integer.

48
00:03:08,420 --> 00:03:18,510
Okay so what are static properties so static properties are those properties which belongs to a class

49
00:03:19,550 --> 00:03:26,050
so these properties belongs to a class and not a single object and not a single student.

50
00:03:26,190 --> 00:03:31,860
Okay so what will happen to the static properties separate copies not created for each object.

51
00:03:32,460 --> 00:03:38,820
Okay so we can access a static property only using classes.

52
00:03:38,930 --> 00:03:41,660
So what we will do we will write.

53
00:03:41,660 --> 00:03:46,500
Static int total student.

54
00:03:50,660 --> 00:03:53,810
We will update this line and we will use the keyword.

55
00:03:53,840 --> 00:03:55,820
Static int to the students.

56
00:03:55,820 --> 00:03:58,840
Now what will happen if you will create an object.

57
00:04:00,140 --> 00:04:06,780
Student S1 so whenever we create an object only the non static properties get copied so roll number

58
00:04:06,780 --> 00:04:07,940
and age.

59
00:04:07,940 --> 00:04:09,890
They both are non-strategic properties.

60
00:04:09,920 --> 00:04:12,760
So by default the properties are non static.

61
00:04:12,890 --> 00:04:18,740
So whenever we create a new object only the non-strategic properties will be copied so roll number and

62
00:04:18,770 --> 00:04:22,310
each these two properties will get copied.

63
00:04:22,310 --> 00:04:28,160
Total students will not be copied and it will contain garbage value because their default construct

64
00:04:28,160 --> 00:04:28,880
can we be called.

65
00:04:29,240 --> 00:04:34,040
Similarly if you will create an ideal object let's call it student S2.

66
00:04:34,430 --> 00:04:37,120
So only the non static properties will be copied.

67
00:04:37,130 --> 00:04:41,240
Static properties are not copied static properties belong to class.

68
00:04:41,720 --> 00:04:47,060
So at this line default constructor will be called and rule number and H contains the garbage will.

69
00:04:47,990 --> 00:04:56,270
Okay so one thing to remember is only the copy of non-strategic property view only copy non-strategic

70
00:04:56,400 --> 00:04:56,970
properties

71
00:05:01,340 --> 00:05:05,920
Okay so separate copy is not created for each object.

72
00:05:05,990 --> 00:05:08,100
When we declare them static.

73
00:05:08,300 --> 00:05:12,570
Okay so student loans students will not be copied.

74
00:05:12,650 --> 00:05:14,550
So what will happen to the students.

75
00:05:14,570 --> 00:05:16,160
So we have a student class

76
00:05:18,920 --> 00:05:24,330
we have student class this student class has three properties.

77
00:05:24,400 --> 00:05:30,530
Rule number which doesn't have any value age which does not have any value.

78
00:05:30,850 --> 00:05:32,580
And it will have total student.

79
00:05:32,590 --> 00:05:34,660
Now let's say the value is 20.

80
00:05:34,710 --> 00:05:35,120
Okay.

81
00:05:35,200 --> 00:05:36,350
So too does student.

82
00:05:36,430 --> 00:05:39,240
Now is a part of student class.

83
00:05:39,340 --> 00:05:42,680
So we have this student class okay.

84
00:05:42,720 --> 00:05:44,450
Now how can we access the role.

85
00:05:44,470 --> 00:05:45,810
But okay.

86
00:05:45,840 --> 00:05:46,760
So do accessibility.

87
00:05:46,790 --> 00:05:48,270
But we need to give it our object.

88
00:05:48,660 --> 00:05:48,910
Okay.

89
00:05:48,930 --> 00:05:56,310
We can access rule number using an object so the accessible number we will write object name dot Roland

90
00:05:56,310 --> 00:06:04,470
but via we need object because rule number is a non static property rule number is on static property

91
00:06:04,740 --> 00:06:06,500
to access a non-strategic property.

92
00:06:06,510 --> 00:06:11,340
We need object to us on order number of similarly installed order number.

93
00:06:11,880 --> 00:06:13,160
And so on.

94
00:06:13,170 --> 00:06:13,500
Okay.

95
00:06:13,770 --> 00:06:19,080
But how can we exist to the student property so told us when property is a static property.

96
00:06:19,080 --> 00:06:24,750
So if I if I will write if I tried to print the value S-1 Dodd told us to rent.

97
00:06:24,780 --> 00:06:25,890
What will happen.

98
00:06:25,890 --> 00:06:27,470
So obviously this line is wrong.

99
00:06:27,470 --> 00:06:28,140
Why.

100
00:06:28,170 --> 00:06:35,040
Because if we'll see it if you will see S1 so S1 does not have any property to the student.

101
00:06:35,100 --> 00:06:36,930
So obviously this line will throw us at it.

102
00:06:37,680 --> 00:06:38,030
Okay.

103
00:06:38,040 --> 00:06:42,220
Because S1 does not have any property to the student.

104
00:06:42,360 --> 00:06:43,910
So this line is wrong.

105
00:06:43,920 --> 00:06:46,310
Now how can we access to the student property.

106
00:06:46,560 --> 00:06:48,590
So total destroying property is a state property.

107
00:06:48,600 --> 00:06:52,630
And I told you static property belongs to a class too.

108
00:06:52,860 --> 00:06:58,070
If you want to access to truly stolen property we have to access it using glass.

109
00:06:58,110 --> 00:07:01,760
So first we have to write last name student.

110
00:07:02,190 --> 00:07:06,990
Then scope resolution operator and then the static property.

111
00:07:06,990 --> 00:07:08,750
The name of district property.

112
00:07:08,790 --> 00:07:10,890
So this is class name

113
00:07:14,940 --> 00:07:29,030
this operator we call it scope resolution operator scope resolution operator and then the name of these

114
00:07:29,030 --> 00:07:33,830
static properties so this is our static property total student.

115
00:07:34,060 --> 00:07:42,130
Okay so this is how we access this is how we can access a static property okay using the glass using

116
00:07:42,130 --> 00:07:42,750
the class.

117
00:07:42,760 --> 00:07:43,440
Okay.

118
00:07:43,450 --> 00:07:50,220
Now how do initialize our static property so static property can only be initialized outside the class.

119
00:07:50,380 --> 00:07:50,670
Okay.

120
00:07:50,680 --> 00:07:56,470
Static properties are initialized outside the class and the syntax is very simple.

121
00:07:56,470 --> 00:08:00,520
We have to write in digit we have right integer here but we will.

122
00:08:00,520 --> 00:08:05,620
But we again have to write in digit then the name of the class.

123
00:08:05,890 --> 00:08:10,190
Then scope resolution operator then the static property name with a static property.

124
00:08:10,390 --> 00:08:12,010
And then it's a value.

125
00:08:12,040 --> 00:08:14,180
So this is how we initialize a class.

126
00:08:14,200 --> 00:08:17,220
This is how we initialize a static property.

127
00:08:17,260 --> 00:08:17,630
Okay.

128
00:08:17,650 --> 00:08:24,250
So static property can only be initialized outside the class so letting good.

129
00:08:24,430 --> 00:08:29,800
So first of all we have to make this property static property because this property is combined for

130
00:08:29,830 --> 00:08:30,950
all the objects.

131
00:08:31,090 --> 00:08:33,570
It is not it does not belong to us investment.

132
00:08:33,580 --> 00:08:36,580
It belongs to a class.

133
00:08:36,600 --> 00:08:42,110
Now I told you if you want to initialize a static property it can be initialized only outside the class.

134
00:08:42,210 --> 00:08:44,620
So we have to write in beta again.

135
00:08:44,820 --> 00:08:47,220
Okay we have to write and digit again.

136
00:08:47,220 --> 00:08:53,040
Then the name of the class which is a student and then scope resolution operator column column then

137
00:08:53,700 --> 00:08:58,900
the name of the property may not name of destructive property and now its value.

138
00:08:59,100 --> 00:08:59,850
Okay.

139
00:08:59,880 --> 00:09:02,100
So initialize

140
00:09:07,280 --> 00:09:09,080
static get a member

141
00:09:12,780 --> 00:09:13,040
okay.

142
00:09:13,050 --> 00:09:18,500
So you have to remembered that we can only initialize distracting properties outside the class.

143
00:09:19,270 --> 00:09:22,760
Okay now let us create some objects

144
00:09:29,290 --> 00:09:30,130
student s 1.

145
00:09:30,130 --> 00:09:30,910
Now what will happen.

146
00:09:30,910 --> 00:09:32,870
Default constructor will be called.

147
00:09:32,890 --> 00:09:34,360
Now let us try to print.

148
00:09:34,360 --> 00:09:35,860
Now let us try to print it.

149
00:09:35,860 --> 00:09:43,310
Rule number in each property so as one dot rule number we can access or no because inseparable property

150
00:09:46,220 --> 00:09:54,910
and similarly let us try to print its age so our son daughter age and Lane Now let us try to print the

151
00:09:54,910 --> 00:10:01,390
value of total student since 2 the student deserve a static property we will access it using the class.

152
00:10:01,630 --> 00:10:09,400
So class name school resolution operator and then the name of the static property okay.

153
00:10:09,800 --> 00:10:11,040
So what should be our output.

154
00:10:11,330 --> 00:10:17,100
So at this line what will happen default constructor will be called so roll number and age board contain

155
00:10:17,280 --> 00:10:19,680
the garbage value so garbage will be printed.

156
00:10:19,680 --> 00:10:21,760
Then again garbage will be printed.

157
00:10:21,760 --> 00:10:24,210
And what is the value of to the student.

158
00:10:24,210 --> 00:10:29,400
So if we see this called the value of the students we initialize it to zero s but should be garbage

159
00:10:29,400 --> 00:10:31,420
will look garbage value and zero.

160
00:10:32,220 --> 00:10:35,190
Okay so let us run this file.

161
00:10:35,550 --> 00:10:36,690
Now we will run this file

162
00:10:40,800 --> 00:10:48,150
so garbage value garbage value and then zero 0 okay solver code is working fine.

163
00:10:48,150 --> 00:10:48,580
Okay.

164
00:10:48,750 --> 00:10:52,050
So everything we discussed is working fine.

165
00:10:52,200 --> 00:10:54,330
Now what will happen if I write

166
00:10:58,810 --> 00:11:02,380
if I am planning to access the code of student property using the object.

167
00:11:02,380 --> 00:11:04,890
Then what will happen.

168
00:11:05,110 --> 00:11:08,040
Okay so outline number 9.

169
00:11:08,040 --> 00:11:09,750
What will happen what will be our output.

170
00:11:10,410 --> 00:11:12,380
Okay so let us run our file.

171
00:11:12,420 --> 00:11:14,850
Let us rent and see what will you add output

172
00:11:18,940 --> 00:11:20,840
so the output is coming out to be 0.

173
00:11:21,970 --> 00:11:22,960
It's very strange.

174
00:11:22,960 --> 00:11:25,680
The output is coming out too busy to solve a code is working.

175
00:11:25,780 --> 00:11:29,320
Campbell is not throwing us any at it but logically this is incorrect.

176
00:11:29,330 --> 00:11:36,730
Okay logic it's incorrect but Campbell is allowing us to do this why it is logically incorrect because

177
00:11:36,880 --> 00:11:42,990
student s one does not have any property with denim told us to rinse okay.

178
00:11:43,070 --> 00:11:50,970
Now what will happen if I try to change the value of total students so S1 dot told us to rent.

179
00:11:50,970 --> 00:11:56,010
Let's make it 20 Okay now let us create an ideal object.

180
00:11:56,010 --> 00:12:06,110
Student s to and let us try to print the value of the students using the object as to so as to dot to

181
00:12:06,250 --> 00:12:14,450
restaurant.

182
00:12:14,490 --> 00:12:21,000
So what I'm doing here is I am trying to change the value of those students using the object S1 and

183
00:12:21,000 --> 00:12:26,610
then I am creating a new object a new student S2 and then I am trying to print the total the value of

184
00:12:26,700 --> 00:12:32,510
the student using the object as to so logically this line is wrong.

185
00:12:32,520 --> 00:12:32,790
Why.

186
00:12:32,790 --> 00:12:36,670
Because student 1 doesn't have any property with the name to the student.

187
00:12:36,690 --> 00:12:40,670
Similarly this line is also wrong but compiler allow us to do this.

188
00:12:40,700 --> 00:12:40,920
Okay

189
00:12:43,870 --> 00:12:47,540
so I see the value of those students is 20.

190
00:12:47,620 --> 00:12:53,140
If we accept that Telstra destroying property using the object as too so why does coming out with 20.

191
00:12:53,230 --> 00:12:53,740
Let's see

192
00:13:00,130 --> 00:13:03,210
so I told you the property to the student.

193
00:13:03,220 --> 00:13:04,600
This is a static property.

194
00:13:04,600 --> 00:13:06,080
It will not get copied.

195
00:13:06,280 --> 00:13:11,690
So we have student class inside the student class.

196
00:13:11,810 --> 00:13:13,560
We have this property to the students.

197
00:13:13,610 --> 00:13:15,310
So there is only one memory block.

198
00:13:15,320 --> 00:13:17,180
There is only one.

199
00:13:17,180 --> 00:13:17,560
Okay.

200
00:13:17,600 --> 00:13:19,040
It will not get copied.

201
00:13:19,040 --> 00:13:23,330
So at this line I am trying to access to the student property so what.

202
00:13:23,340 --> 00:13:24,580
Object Lesson will do.

203
00:13:24,650 --> 00:13:26,060
It will go to class.

204
00:13:26,060 --> 00:13:27,010
It will reach class.

205
00:13:27,020 --> 00:13:30,290
It will lose history ruling class and it will try to redo its property.

206
00:13:30,290 --> 00:13:31,810
So initially it was zero.

207
00:13:31,850 --> 00:13:39,080
So without the zero then I am changing the value of total student so S1 it will reach the student class

208
00:13:39,440 --> 00:13:44,550
and it will change the total Australian property which is it now becomes 20 --.

209
00:13:44,630 --> 00:13:52,700
Then I am creating a new object as to as to draw total student so the object is to reach the class and

210
00:13:52,700 --> 00:13:59,390
it will read the total student value which is twenty so twenty will get printed and similarly when I

211
00:13:59,390 --> 00:14:01,990
am printing the value of total student which is 20.

212
00:14:02,060 --> 00:14:09,920
Okay so we can change we can change the value of static property using any object okay using any object

213
00:14:09,950 --> 00:14:13,570
we can change its properties but logically it's incorrect okay.

214
00:14:13,730 --> 00:14:17,170
Logically it is incorrect but compiler allow us to do this.

215
00:14:17,300 --> 00:14:18,860
Okay but we should not do this.

216
00:14:18,980 --> 00:14:24,180
If you want to access the static properties accessed using the name of the class.

217
00:14:24,230 --> 00:14:28,400
Okay so logically it is incorrect but compiler allow us to do this.

218
00:14:28,410 --> 00:14:29,680
Okay.

219
00:14:29,920 --> 00:14:31,690
Now let's see.

220
00:14:31,690 --> 00:14:33,840
So as we discussed in the starting of the video.

221
00:14:33,910 --> 00:14:37,350
So as we're discussing the starting of the video our aim is very simple.

222
00:14:37,360 --> 00:14:43,670
As soon as we create a new object the value of the stolen property should be incremented by 1.

223
00:14:43,690 --> 00:14:44,000
Okay.

224
00:14:44,020 --> 00:14:49,560
If I create tools to rent then the value of p s total student property will they will.

225
00:14:49,720 --> 00:14:53,610
If I create dense rent the value of the certain property will return.

226
00:14:54,120 --> 00:14:54,380
Okay.

227
00:14:54,400 --> 00:14:55,870
So how to do this.

228
00:14:56,140 --> 00:15:00,520
So we know how to initialize to different how to initialize a static property.

229
00:15:00,520 --> 00:15:06,590
We know how to access a static property but we do not know how to update a static property.

230
00:15:06,610 --> 00:15:09,570
Okay so what we can do is we can.

231
00:15:09,610 --> 00:15:12,220
We can take the help of a constructor.

232
00:15:12,250 --> 00:15:12,480
Okay.

233
00:15:12,490 --> 00:15:18,310
So what will happen whenever we create our object constructor will be called and inside the constructor

234
00:15:18,460 --> 00:15:21,590
we will write to those two rent plus plus.

235
00:15:21,610 --> 00:15:32,160
Okay so I am planning to create a constructor so we know when the object will be created constructor

236
00:15:32,170 --> 00:15:36,940
will be called and inside the constructor we will write to the student plus press.

237
00:15:37,550 --> 00:15:37,840
Okay.

238
00:15:37,870 --> 00:15:42,190
So in this way the value of clustering the property will be incremented okay.

239
00:15:43,240 --> 00:15:47,600
So let us delete all this called.

240
00:15:47,740 --> 00:15:53,260
Now let us create a student so a student has to now let us create more students.

241
00:15:53,290 --> 00:15:57,930
Student as 3 as food as 5.

242
00:15:58,000 --> 00:16:03,650
So after creating face to rent I am trying to print the value of total student.

243
00:16:03,730 --> 00:16:05,620
Okay so what should be our output.

244
00:16:05,710 --> 00:16:10,720
Let's see.

245
00:16:10,860 --> 00:16:12,680
Okay so why is this coming out to be zero.

246
00:16:12,690 --> 00:16:20,860
Because after doing changes to this file after doing industrialist failed before God to this file.

247
00:16:21,060 --> 00:16:22,080
Now we will read this file.

248
00:16:24,350 --> 00:16:32,790
See no doubt produce coming out to be 5 via 5 because because first the constructor is called Forced

249
00:16:32,790 --> 00:16:37,030
to index 1 so told us restaurant become 1 then the constructor is called for this too.

250
00:16:37,090 --> 00:16:42,100
So the value of Telstra and property becomes two and then the constructor will be called for student

251
00:16:42,170 --> 00:16:44,330
S3 as food and is 5.

252
00:16:44,350 --> 00:16:49,620
So in this way the value of total student property became 5 okay.

253
00:16:49,830 --> 00:16:56,400
So just like that starting with the members we can make functions statically so okay we can make static

254
00:16:56,400 --> 00:17:04,090
functions also so suppose I have a function and to get William but

255
00:17:07,290 --> 00:17:09,000
I a function get on them.

256
00:17:09,010 --> 00:17:15,670
But so what this function will do it simply will return the roll number

257
00:17:18,740 --> 00:17:22,130
okay now dysfunction get really embodies object dependent function.

258
00:17:22,130 --> 00:17:25,620
This function depends on the object and object will like this function.

259
00:17:25,670 --> 00:17:28,950
So by default this function is an offset to function.

260
00:17:29,120 --> 00:17:34,690
So by default every function and by default everyday demand men but they are non static.

261
00:17:34,700 --> 00:17:35,160
Okay.

262
00:17:35,270 --> 00:17:40,010
So by default this is non static since this function is known instead start again object will call this

263
00:17:40,010 --> 00:17:43,930
function S1 dot getter William but astronaut good William.

264
00:17:43,940 --> 00:17:48,190
But still we need an object to call this function okay.

265
00:17:48,230 --> 00:17:57,780
Now what I want to do is now let's make this property a private property now since this property is

266
00:17:57,780 --> 00:17:59,220
a private property.

267
00:17:59,220 --> 00:18:02,110
We need a getter function to access this property.

268
00:18:02,250 --> 00:18:04,860
So let us create a getter function.

269
00:18:04,860 --> 00:18:10,420
So in get to those rent

270
00:18:15,850 --> 00:18:26,610
to what this function will do it will return to restaurants Okay so we will make this function as a

271
00:18:26,620 --> 00:18:27,940
static function.

272
00:18:27,940 --> 00:18:29,980
So after writing The Giver static.

273
00:18:29,980 --> 00:18:34,650
Now this function belongs to a class object will not be able to call this function.

274
00:18:34,660 --> 00:18:39,190
Okay so S1 dot get to the student astronaut get restaurants.

275
00:18:39,190 --> 00:18:40,210
These are wrong.

276
00:18:40,390 --> 00:18:48,440
How we will call this function so I told you this function belongs to a class so does index to excess

277
00:18:48,490 --> 00:18:53,090
that start to function is the name of the glass school resolution operator.

278
00:18:53,840 --> 00:18:59,950
And the name of the function name of the static function which is get total student.

279
00:19:00,110 --> 00:19:06,080
So this is how we will call this function if you will write as DA to get to those rent.

280
00:19:06,160 --> 00:19:12,780
Now this is logically wrong why this is logically wrong because this function is a static function and

281
00:19:12,780 --> 00:19:13,440
static means.

282
00:19:13,440 --> 00:19:17,600
This belongs to class and not to an object okay.

283
00:19:19,620 --> 00:19:21,690
Now there are a few properties.

284
00:19:21,690 --> 00:19:25,950
There are a few important things that we should know about the static functions.

285
00:19:25,950 --> 00:19:32,010
Okay so few properties of destructive function nodes.

286
00:19:32,180 --> 00:19:33,600
So the first thing.

287
00:19:33,750 --> 00:19:40,130
So the first thing is static functions can only exist static properties whether it is a data member

288
00:19:40,220 --> 00:19:41,540
or a function.

289
00:19:41,540 --> 00:19:47,960
Okay so the function can only exist static properties whether it is indeed a member or a function.

290
00:19:47,960 --> 00:19:50,360
We cannot use non-strategic function.

291
00:19:50,360 --> 00:19:53,900
We cannot use non-strategic the member inside a static function.

292
00:19:53,900 --> 00:19:58,030
And also we cannot call non-strategic functions.

293
00:19:58,290 --> 00:20:01,370
Okay so static function

294
00:20:05,340 --> 00:20:20,800
can only access static data members start to the members and can call only static functions.

295
00:20:25,550 --> 00:20:29,540
So for example get told us when this is a static function.

296
00:20:29,540 --> 00:20:37,060
So if you will right here return age then this is wrong.

297
00:20:37,060 --> 00:20:42,700
Error will be added because the first property of static function is the can only exist static data

298
00:20:42,710 --> 00:20:48,250
members and they can only call static functions okay.

299
00:20:48,280 --> 00:20:55,330
Now the second property of the static functions are static function do not have access do not have discovered

300
00:20:56,520 --> 00:21:00,000
static function do not have discovered.

301
00:21:00,000 --> 00:21:04,610
Okay because we do not call static function to an object.

302
00:21:04,650 --> 00:21:08,180
So what happened is this is a normal function.

303
00:21:08,180 --> 00:21:10,660
So to call this normal function we need an object.

304
00:21:10,920 --> 00:21:20,210
So as one dot get rule number so this object will be stored in that this keyword of this function.

305
00:21:20,220 --> 00:21:26,940
Now when we have static function so for calling the static function we do not need an object since we

306
00:21:26,940 --> 00:21:28,530
do not need an object.

307
00:21:28,530 --> 00:21:30,850
We do not need this operator.

308
00:21:31,050 --> 00:21:31,610
Okay.

309
00:21:31,680 --> 00:21:37,860
So these are the two very important properties of static functions first static function can only have

310
00:21:37,860 --> 00:21:42,820
access of the static grid members and they can only call static function.

311
00:21:42,870 --> 00:21:48,210
Second properties starting function do not have this keyword because we do not use object to call these

312
00:21:48,210 --> 00:21:49,000
functions.

313
00:21:49,020 --> 00:21:49,470
Okay.

314
00:21:49,530 --> 00:21:52,230
So this is all about static properties of a glass.

315
00:21:52,350 --> 00:21:53,640
We can make a data member.

316
00:21:53,670 --> 00:21:57,230
Static and we can also make functions static okay.

317
00:21:57,300 --> 00:22:02,320
Static means these properties belongs to a class and not to object.

318
00:22:02,530 --> 00:22:04,230
Okay thank you.
