A pointer is a variable type that allows you to refer indirectly to another object. Instead of holding data, a pointer holds the address to data -- the address of another variable or object. You can change the address value a pointer points to thus changing the variable or object the pointer is pointing to.
A reference is a type of pointer that cannot change and it must always point to a valid storage (no nulls).
A pointer is a variable type that allows you to refer indirectly to another object. Instead of holding data, a pointer holds the address to data -- the address of another variable or object. You can change the address value a pointer points to thus changing the variable or object the pointer is pointing to.
A reference is a type of pointer that cannot change and it must always point to a valid storage (no nulls).
Implicit Pointer Usage
Pointers are a fundamental part of all languages even if a language doesn't support using developer defined pointer data types. For example, strings and object instances are just pointers. Event handlers such as a button click or open are actually a pointer to a method.
Developer Defined Pointers
Everything used in an application is stored somewhere in computer memory and a pointer holds the address of those things. When a computer language allows you to use developer defined pointers, it allows you to set, or reset, the address a pointer is pointing to. Pointers allow you to directly work with computer memory which is both powerful and scary.