In OOP, there are entities (e.g. Person) which has attributes (e.g. name, address, etc) and it has methods. How do you describe new
? Is it a method or just special token to bring an abstract entity to real one?
Depending on the language new
is a keyword which can be used as an operator or as a modifier. For instance in C# new can be used:
For brand new students I would describe new
only as a keyword and leave the modifier out of the discussion. I describe classes as blueprints and new
as the mechanism by which those blueprints turn into something tangible - objects.
You may want to checkout my question: How to teach object oriented programming to procedural programmers for other great answers on teaching OOP to new developers.