الطريقة (Method)

الطريقة (وأحياناً تسمى الوظيفة) هي دالة معرفة في مستوى الكلاس Class، وغالباً ما تعمل في إطار عنصر برمجي Object.

It can be:
  • public - It becomes part of the class interface.

  • private - Only other methods of the class can use it.

  • dynamic - It acts a specific object.

  • static - It is global, and can use only other static elements of the class.

A method can return a value, whose datatype is the datatype of the method.

A method have arguments, each one having a datatype. Some of the arguments can be optional.

A method can be programmed in جامباس, or in C/C++ when defined in a native المكوٍّن.

إنظر أيضا