Computer Science, asked by Sweetyhoty1916, 1 year ago

What are the methods which begin and end with two underscore characters called?

Answers

Answered by raghavgarg34
7

Answer:

mujhe nhi ptaa iska answer,,,, kisi aur se puch le

Answered by smartbrainz
0

Methods beginning and ending with an underscore are called 'Magic Methods' or 'Dunder'

  • 'Dunder', here refers to the two underscores at the start and end of method name. 'Dunder' is the short form for 'Double Under'(underscores).
  • These methods are also called as 'Magic Methods' and are used for Operator Overloading.
  • Operator Overloading is a concept, used with user-defined types which allows  re-definition of the way operators are used.
  • In simpler terms magic methods allow addition of two strings, using the '+' operator without explicit typecasting.
  • Many programming languages use such methods. Example Python, C++, PHP and so on.

To know more about Operator Overloading, visit:

https://brainly.in/question/9144056

Similar questions