I am reading a document about refactoring says, without mentioning any condition or something -
Convert array stores multiple data items into an object
The example given is:
I just don't get this. I'll use array whenever I need it, how can I replace it with an object? If I need multiple attributes of car, I'll create Car class but I'll still create array of Car (instead of
String) when I need it....