मराठी

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×