Discuss Forum

1. In Object Oriented Programming a property can be accessed from ________.

  • A. anywhere of the object
  • B. anywhere of the object
  • C. anywhere of the object
  • D. anywhere of the object

Answer: Option B

Explanation:

মনে রাখতে হবে, Object Oriented Programming - এ class এর তিন ধরনের Access Specifier আছে। যথাঃ

public - members are accessible from outside the class

private - members cannot be accessed (or viewed) from outside the class, only within the class.

protected - members cannot be accessed from outside the class, however, they can be accessed in inherited classes.

Inheritance: When one object acquires all the properties and behaviours of a parent object or parent class, it is known as inheritance.


সুতরাং, উত্তরঃ Private Class এর member গুলো শুধুমাত্র Class ভিতরে থেকে Access করা যাবে। বাইরে থেকে নয়।


Post your comments here:

Name:
Mobile:
Email:(Optional)

» Your comments will be displayed only after manual approval.