InterviewSolution
Saved Bookmarks
| 1. |
When Do You Generally Use A Class Over A Struct? |
|
Answer» A class is used to model more complex BEHAVIOR, or DATA that is INTENDED to be modified after a class object is CREATED. A struct is best suited for SMALL data structures that contain primarily data that is not intended to be modified after the struct is created. A class is used to model more complex behavior, or data that is intended to be modified after a class object is created. A struct is best suited for small data structures that contain primarily data that is not intended to be modified after the struct is created. |
|