Method ne demek?

Method, Türkçede “metot” ya da “yöntem” anlamına gelir.

ˈmeθədisimTemel terim

Yazılım İngilizcesi · Programlama Kavramları

Bir sınıfa ya da nesneye ait olan ve genellikle o nesnenin verileriyle çalışan fonksiyon; örneğin user.save() veya list.sort().

English: A function that belongs to a class or object and usually works with that object's data, for example user.save() or list.sort().

Nerede ve nasıl kullanılır?

Bir nesne üzerinde metot çağrılır: 'call the save method on the user'. 'Static method', 'private method' ve 'helper method' kalıpları da sık duyulur. Günlük konuşmada birçok kişi 'method' ve 'function' kelimelerini aynı anlamda kullanır. Türkçede 'metot' yazımı doğrudur; 'metod' da sık görülür.

Örnek cümleler

  1. Move this logic into a private method so the controller stays short.

    Controller kısa kalsın diye bu mantığı private bir metoda taşı.

  2. The getTotal method returns the wrong value when the cart is empty.

    Sepet boşken getTotal metodu yanlış değer döndürüyor.

Sık kullanılan kalıplar

  • call a method
  • static method
  • private method
  • helper method
  • override a method