Nepal's #1 Tech Blog

,

How to create an object from Class?

604,813 views 10,080 likes

Last Updated on by ICT Byte

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

Also Read:

Visited 42 times, 1 visit(s) today