Skip to content

Instantly share code, notes, and snippets.

@kylelong
Created January 9, 2019 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylelong/fc7fb78083395f415ec21a6913109fd9 to your computer and use it in GitHub Desktop.
Save kylelong/fc7fb78083395f415ec21a6913109fd9 to your computer and use it in GitHub Desktop.
Questions about pointers from cassido's 1/7/19 newsletter
- 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