हिंदी

Create a class with one integer instance. Initialize the variable using: Default constructor. - Computer Applications

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 [पृष्ठ ४१६]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 7 Constructors
Review Insight | Q 12. (i) | पृष्ठ ४१६
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×