1

00:00:01,140  -->  00:00:06,540
Not understand collage starting at a more in-depth level and below that it is the first stage in the

2

00:00:06,540  -->  00:00:09,310
lifetime of that type.

3

00:00:09,570  -->  00:00:12,460
And here is the illustration of the class voting process.

4

00:00:12,530  -->  00:00:16,160
When it is accessed be a class or an interface.

5

00:00:16,170  -->  00:00:22,890
The classloader objects if the corresponding class object is already on the heap if it is on the heap

6

00:00:22,890  -->  00:00:23,010
.

7

00:00:23,040  -->  00:00:24,830
It pre-concert class object.

8

00:00:24,990  -->  00:00:29,420
Otherwise it means that the pipe is accessed for the very first time.

9

00:00:29,550  -->  00:00:35,280
So the coroner tries to look kid the corresponding dot class file using something called a zip here

10

00:00:35,280  -->  00:00:38,290
in delegation moortel which we will discuss next.

11

00:00:38,490  -->  00:00:43,800
If the doctor find his phone then the classloader loads the corresponding byte Goertz uncreate to a

12

00:00:43,800  -->  00:00:45,940
class object undercuts it.

13

00:00:46,140  -->  00:00:49,620
And this class object will be stored on the heap for future use.

14

00:00:49,950  -->  00:00:55,510
If the Dartmouth's phone is not phone then an exception called class not one exception is thrown.

15

00:00:55,770  -->  00:01:01,800
If you recall dishcloths voting process was demonstrative and a clips to Grolier were discussing eclipse

16

00:01:01,800  -->  00:01:07,770
debugger and through it also look at it once again in a demo that we will soon do for Dumont's strict

17

00:01:07,760  -->  00:01:14,610
in one lifetime of type not a look at board the beat and delegation mortel is which comes into play

18

00:01:14,700  -->  00:01:17,410
when a pipe is accessed for the very first time.

19

00:01:17,640  -->  00:01:24,600
As you can see here Jawa has multiple clusters each noting Klaas's Krim different repositories on the

20

00:01:24,600  -->  00:01:24,870
top.

21

00:01:24,870  -->  00:01:30,820
We have the bootstrapped Wastwater which is also referred to as primordial classloader underclothes

22

00:01:30,840  -->  00:01:30,880
.

23

00:01:30,900  -->  00:01:37,890
All the code just wipe your eyeglasses on this would include the odd Donjon file in the GEORGIS slash

24

00:01:37,890  -->  00:01:39,370
lib directory.

25

00:01:39,510  -->  00:01:44,110
On this crossborder is implemented as part of the JVM SAYS.

26

00:01:44,160  -->  00:01:49,410
Next we have something called the extension classloader which is responsible for the learning process

27

00:01:49,590  -->  00:01:57,080
from the standard Java extension abs which are in the GRC slash lib slash Yixin directory.

28

00:01:57,300  -->  00:01:59,070
So much that it was accurate.

29

00:01:59,610  -->  00:02:05,500
Next we have application or System class order which your application classes from the class bought

30

00:02:05,530  -->  00:02:05,910
.

31

00:02:06,270  -->  00:02:11,910
So these are regular classes that we don't post right on below application classloader we have user

32

00:02:11,940  -->  00:02:13,530
defined clusters.

33

00:02:13,650  -->  00:02:20,730
That is their custom cross borders created by a regular doper's under used to load classes from nonstandard

34

00:02:20,810  -->  00:02:26,250
user defined sources like and corrupted files databases and so on.

35

00:02:26,280  -->  00:02:32,970
These murders are done in Java on Dexter an abstract Glass called classloader which is from the Gelada

36

00:02:33,290  -->  00:02:34,330
package.

37

00:02:34,680  -->  00:02:42,120
So user defined Glosson roaders are compiled unordered just like any other object in general most developers

38

00:02:42,380  -->  00:02:45,780
may never create any custom crossroads object.

39

00:02:45,780  -->  00:02:51,890
Typically they are done in certain kinds of advanced software like in the case of web servers like Tomcat

40

00:02:51,910  -->  00:02:52,990
.

41

00:02:53,100  -->  00:02:58,290
You can see that these cross borders are connected via a parent child relationship and that is every

42

00:02:58,290  -->  00:03:04,860
classloader except the top one has appeared on the parent delegation more it for locating a class file

43

00:03:05,010  -->  00:03:07,310
comes from this relationship.

44

00:03:07,360  -->  00:03:12,630
No when in particular classloader hastily wrote it classify it first console's its period.

45

00:03:12,870  -->  00:03:18,540
That is it delegates the search irresponsibility brute spirit and that bit it in turn concerns its own

46

00:03:18,540  -->  00:03:23,310
period and the process continues until the bootstrap cost is reached.

47

00:03:23,310  -->  00:03:30,120
If the boozed up müssen order does not find a class in its repository then its child which is the extension

48

00:03:30,120  -->  00:03:34,080
classloader Kreiss Christ defined in its own repository.

49

00:03:34,090  -->  00:03:38,990
This is where the counter goes downwards under the crossborder that initiated the search.

50

00:03:39,000  -->  00:03:41,730
So just in its own depositary.

51

00:03:41,730  -->  00:03:46,650
But if the cross file is found somewhere in between then the corresponding byte Goertz will be loaded

52

00:03:46,650  -->  00:03:48,240
into memory.

53

00:03:48,310  -->  00:03:54,270
No the reason why we have this bit in delegation's search model is because JVM considers that repositories

54

00:03:54,290  -->  00:03:58,860
at the top as more trustworthy compared to the once at lower levels.

55

00:03:59,100  -->  00:04:03,690
That is bootstrapped last word is repository is considered more trustworthy than extension's glass Lauder's

56

00:04:03,690  -->  00:04:09,080
repository that just consider more trustworthy than application cluster does depositary.

57

00:04:09,360  -->  00:04:15,600
If the concern is found in that trustworthy repository then JVM does not perform stringent security

58

00:04:15,600  -->  00:04:19,970
checks and the verification step in their thinking stage.

59

00:04:19,980  -->  00:04:26,520
Otherwise JVM performs a strict security checks for instance of the file is found by the application

60

00:04:26,540  -->  00:04:34,050
Krasnodar then the bytecode verify or performs all kinds of checks as repositories not considered trustworthy

61

00:04:34,750  -->  00:04:40,960
conduct would not be the case with a cordial IP questions that are considered most trustworthy.

62

00:04:42,350  -->  00:04:47,860
So we looked at the paid interrogation model which kicks in when it classes access for the first time

63

00:04:47,860  -->  00:04:48,430
.

64

00:04:48,530  -->  00:04:55,660
So the next thing is in Vought instances a classes accessed unhandsome loaded for very fast classes

65

00:04:55,680  -->  00:05:01,070
loaded when an instance of it is created via the new operator.

66

00:05:01,070  -->  00:05:07,290
It isn't ordered one off its document that is accessed and it is also loaded when one of its toxic fuses

67

00:05:07,310  -->  00:05:12,110
accessed either reading a value or assigning some value to it.

68

00:05:12,380  -->  00:05:17,960
Note that accessing compile time constants will not blow declasse and that's because they are compile

69

00:05:17,960  -->  00:05:19,300
time constants.

70

00:05:19,370  -->  00:05:25,070
That is their values are known at compile time itself and hence they're copied the word they are used

71

00:05:25,070  -->  00:05:25,930
.

72

00:05:25,940  -->  00:05:31,800
So if a different process is using it then the corresponding field value will be copied into that dot

73

00:05:31,820  -->  00:05:33,220
CROSSFIRE.

74

00:05:33,230  -->  00:05:35,640
So there's no point loading the class here.

75

00:05:35,960  -->  00:05:39,800
And this would've been a monster demonstrated in the demo that we will soon do in a couple of lessons

76

00:05:39,800  -->  00:05:40,600
from now.

77

00:05:40,970  -->  00:05:46,250
So as long as we are accessing a field that is not a compile time constant then the corresponding class

78

00:05:46,250  -->  00:05:50,870
will be ordered classes ordered if its subclasses are ordered.

79

00:05:50,990  -->  00:05:52,870
OK so just keep that in mind.

80

00:05:53,470  -->  00:05:55,240
And the class is obviously loaded.

81

00:05:55,280  -->  00:06:02,180
If it does run from the command line finally it can also be loaded with reflection on we were discuss

82

00:06:02,180  -->  00:06:05,400
reflection and few lessons from now.

83

00:06:05,420  -->  00:06:09,890
So those are the instances when a class is loaded for the very first time.

84

00:06:10,080  -->  00:06:17,390
Now when it comes to an interface except for the Fuster isn't an interface Voula also be loaded in all

85

00:06:17,390  -->  00:06:20,460
other instances with regards to the first reason.

86

00:06:20,480  -->  00:06:27,320
We know that we cannot instantiate an interface just know of second instance is possible only from July

87

00:06:27,410  -->  00:06:28,370
8 onwards.

88

00:06:28,670  -->  00:06:35,390
As part of Java aid interfaces cannot house start it matters on for the same reason an interface can

89

00:06:35,390  -->  00:06:37,670
be run from the command line also.

90

00:06:37,810  -->  00:06:43,640
And that's possible only from July 8 onwards and that's because the main method is this tactic method

91

00:06:43,640  -->  00:06:43,910
.

92

00:06:43,910  -->  00:06:46,410
So the interface can have a main method.

93

00:06:46,490  -->  00:06:50,930
Finally an interface can also be loaded when a sub interface is loaded.

94

00:06:51,020  -->  00:06:58,490
In addition to suppress the class it can only be a subclass as it cannot have a sub interface that is

95

00:06:58,490  -->  00:07:01,860
an interface cannot ekster Nicholas.

96

00:07:02,630  -->  00:07:07,460
No let's discuss a little bit about a class object which is the output of the class throating process

97

00:07:08,070  -->  00:07:14,810
unladen we would have more effort while coding reflection the most important thing to know is that all

98

00:07:14,810  -->  00:07:21,260
the objects that we create from a particular class is always done using the class object of ductless

99

00:07:21,600  -->  00:07:26,470
and that's how GBM creates objects for us.

100

00:07:26,480  -->  00:07:30,530
It's not just class an interface that would have a class object.

101

00:07:30,530  -->  00:07:32,390
Even all primitive types.

102

00:07:32,420  -->  00:07:39,340
The void keyword on our base would have a class object later when doing a dim off reflection B would

103

00:07:39,370  -->  00:07:45,740
see hope class object also Madieu will be useful on with regards to our is.

104

00:07:45,830  -->  00:07:49,510
Note that all R is of same dimension n same type.

105

00:07:49,510  -->  00:07:54,330
Have the same class object lenth of the R It does not play any at all here.

106

00:07:54,770  -->  00:08:02,100
For example an entry of entry has the same class object as and array of Lent hundred since both out

107

00:08:02,110  -->  00:08:05,980
of pipe in unbought have the same number of dimensions.

108

00:08:07,100  -->  00:08:13,400
Gas object basically contains Medine for mission aboard the class and we can get that information using

109

00:08:13,400  -->  00:08:16,410
its methods on some of them are shown here.

110

00:08:16,460  -->  00:08:22,700
The first method name would simply written the name of the class get superclass method worked on the

111

00:08:22,700  -->  00:08:29,480
superclass of the current class so that it can bite is the class object of the code I'm closer to possess

112

00:08:29,580  -->  00:08:29,980
either.

113

00:08:30,020  -->  00:08:34,740
Object class or an interface or a primitive type or void.

114

00:08:34,850  -->  00:08:38,770
Then null is returned as they don't have a superclass.

115

00:08:38,930  -->  00:08:44,650
If this class object represents an array class then the class object representing the object lost is

116

00:08:44,650  -->  00:08:45,630
returned.

117

00:08:46,220  -->  00:08:52,010
Next is the user interface muttered under detainments of the current class object represents an interface

118

00:08:52,110  -->  00:08:55,020
not Nexus get interface estimate.

119

00:08:55,260  -->  00:09:02,000
Underachieve does all the interfaces implemented by the current class and get frustrated a third rate

120

00:09:02,030  -->  00:09:07,080
and that classloader that loaded this class under-exposed more interesting methods.

121

00:09:07,110  -->  00:09:11,650
In the dim off reflection I think you can check out all the methods in a game.

122

00:09:11,720  -->  00:09:16,090
Once we do that Demel so up with the class throwing process.

123

00:09:16,130  -->  00:09:18,530
We looked at the class learning process itself.

124

00:09:18,800  -->  00:09:24,650
We looked at class loaders and also the bean in delegation model which happens when a class has access

125

00:09:24,650  -->  00:09:25,980
for the very first time.

126

00:09:26,180  -->  00:09:31,900
And we also looked that instances when a type is access for the very first time and finally we looked

127

00:09:31,940  -->  00:09:34,260
at the class object itself.

128

00:09:34,820  -->  00:09:35,240
Thank you
