life of the equal to the value three the cop aspin so that all the constructor did with a wrote into the little places for piak simpy why which means it will go into the memory locations at the computer set aside for it the values two and three any questions about that um... the one thousand tries on that excellent point why there are one thousand over here because the one last thing i didn't actually mentioned is after we set aside the memory for the new points what are we going to do with that point we're going to sign it if you want so here is the critical concept how does the computer nowhere p one and all the information associated with he won it every object lives in an address the way the computer actually is referring to object underneath the hood is by the address at which they lit and so you can think of there are some of the house over here that if you want outside like little kids in the house piak simply wider like all of them children restore integer and i say what how do i know how to access you p one i need your address which is a thousand that's where you live so when i do this new when i create the memory in off the heat it says hey i'm going to sign that over turkey one what's the thing that you're actually signing you're signing the memory address for where p one lives arts starting address and from the starting address to confide everything that lives in one so it's getting store here the study found it is not in a major you don't want to think about like the value one thousands of miniature you want to think of this as the memory address one thousand so it is a little overhead gives e additional information that you keep track so how do we do the next very similar kind of concept we say hey i'm going to create a new point okie i need some more memory into the heap says okay why everything off into a thousand eight was allocated so i mean allocates give you some more space in memory that's enough space to store another point which means i'm going to give you space for your instance variables px if you want your overhead notice this dx in p why are distinct from that kexin life this is the p x imp you watch they really instance variables if you want the second px and key white over here at the instance variables of p two very distinct thing so they have separate memory to store them and same thing when we return value that we're going to sign two key to what we're going to sign is the address it's the beginning of the space that we set aside the memory that we set aside for pty method up you know one thousand seats or one thousand say yes any questions about that and space for the same thing accepted to the heat is going down all those memories are given allocated to a new memory we need requires the keep to keep growing downward funky things right we're going to do a method call so we're going to say p one dot cmu we're going to do a method call when we do a method call what ends up happening is we're going to have some parameters and some local variables which means we're going to have to allocate some memory on the staff for that method call so when we start the map that call what ends up happening and we say hey key one i want you to move yourself by ten comm eleven so what actually happens in memory what happens in memory starting at this point upward is we create a new stack frame remember we talked about stack frame to be said when you call a method it sort of like the previous method of previous place you're running just get suspended we try to create this new frame on top that the contains all the information we drew little boxes for the variables and all that one week itself like tracing palindrome than all that happy news remember that if remember that night yeah what was going on underneath the hood it wasn't just nice and with the time it was nice pictures this is what was going on and meet the hood some memory was getting crated on the stack and that's why we refer to this as a stack frame it's keeping track of that frame of information for the method call and it doesn't on the staff of swatches factory what information goes on the stack frame while you get sent over head for the fact that you're calling a method for the earth is overhead as this first four bikes here you get all the parameters that you're passing to the map and you might say but here in the framers on passing through method or d why in the axe what's this in this thing of about there's a hidden parameter that you didn't know about until now now you know about it when i'm calling to method on a particular object how do i know which object won some actually getting into the details of things i actually called the method on and so when you make a method called on an object the very first thing after the overhead that gets put onto the stack essentially a pointer to the object it's what we are for tourism this point to remember we talked about that this pointer and we said this is basically a way for an object to a flirt with self when it's been called or how does it know how to reply to itself it needs to know where itself that's kinda we are in their own wiser optic need to know where it lives itself because when i write some acted these methods are not yet associate with particular objects that i created once i craved particular objects and call that method on them this method over here needs to know hey we're not doing these modifications on piak simply wife which piak simply why are you referring to that's where this comes in this set hey i'm going to tell you the place where the particular object lives whose method is being called so whatever modifications you make over here you know to make them for the object that lives at this addressed which is why it's called so when you make a method call the first thing you get is the address the particular object that remain the method call on right were making a method called he won in p one lives at of thousand right so if you want to just a thousand so this is the value of thousandth and then i get the parameters in reverse order because the sax going up right i get the axe first then i get do you watch and they were just at the value ten and eleven of the past and and i get copies of those down questions about that this pointer here's a graphics variables and when you can when you add up 