Advertisements
Advertisements
प्रश्न
Create a class with one integer instance. Initialize the variable using:
Default constructor.
कोड लेखन
उत्तर
class Sample
{
int a;
Sample() // Default constructor
{
a = 0;
}
}
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Constructors - Review Insight [पृष्ठ ४१६]