To create object in OOP, there are three steps.
Step 1: Declaration object type and variable
- Declare a variable with variable name
- Declare object type
Step 2: Instantiation using keyword “new”
- The “new” keyword is used to create object
Step 3: Initialization of the object
- “New” keyword is followed by call to a construction
- This step initializes the new object
Comments are closed, but trackbacks and pingbacks are open.