Created
January 9, 2019 02:14
-
-
Save kylelong/fc7fb78083395f415ec21a6913109fd9 to your computer and use it in GitHub Desktop.
Questions about pointers from cassido's 1/7/19 newsletter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- What is the difference between passing by value and passing by reference? | |
By value: Passes the value of the memory address that the pointer points to. | |
By reference: Passes an alias to “reference” the variable passed in. | |
- How can pointers be used with inherited or abstract classes? | |
Using static methods. | |
- What does it mean for a pointer to be null? | |
The pointer does not point to any address in memory. | |
- What happens when you use the dereference operator (&) on a null pointer? | |
NullPointerException. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment