हिंदी

"Member method and constructor can be defined private". Write whether the given statement is true or false, give reasons.

Advertisements

प्रश्न

"Member method and constructor can be defined private". Write whether the given statement is true or false, give reasons. 

विकल्प

  • True

  • False

MCQ
सत्य या असत्य
Advertisements

उत्तर

This statement is False.

Explanation:

A member method can be private but a constructor can never be declared private because the object creation outside the class may not be possible. Hence, the given statement is false.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Constructors - Review Insight [पृष्ठ ४१५]

APPEARS IN

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



      Forgot password?
Use app×