Day 30 Recap Questions
- What is difference between initialization and assignment?
- Does the line
f2 = f1;
use initialization or assignment (assumeFoo
is a class andf1
andf2
are both of typeFoo
)? - Does the line
Foo f2 = f1;
use initialization or assignment (assumeFoo
is a class andf1
is of typeFoo
)? - What is a shallow copy and what is a deep copy?
- What is the rule of 3?