a)
Answer the following questions based on the code above:
a) What kind of types are person1 and person2?
b) Do person1 and person3 point to the same value in memory?
c) Is the integer "number" stored in the heap or in the stack?
d) Is the value that "person1" points to stored in the heap or in the stack?
b)
Make your own class (hopefully related to your project!). It should have getters and setter for reference types, and show your understanding of value types. Have a method that modifies a value type outside of a method, and a method that takes in an array and makes changes to that array only inside the method. Find the memory address of your object. Finish any popcorn hacks.
Lesson Link:
Here
wget link: https://raw.githubusercontent.com/Del-Norte-Farmers-Iowa-Hawkeyes-Fanclub/Del-Norte-Association-of-Sustainable-Farmers-Saftey-OSHA-and-Fantasy-Log-Book/main/_notebooks/2024-03-12-ValueReferenceTypes.ipynb
Hacks:
a) Answer the following questions based on the code above:
a) What kind of types are person1 and person2?
b) Do person1 and person3 point to the same value in memory?
c) Is the integer "number" stored in the heap or in the stack?
d) Is the value that "person1" points to stored in the heap or in the stack?
b) Make your own class (hopefully related to your project!). It should have getters and setter for reference types, and show your understanding of value types. Have a method that modifies a value type outside of a method, and a method that takes in an array and makes changes to that array only inside the method. Find the memory address of your object. Finish any popcorn hacks.