Example of an instance method? (Java)

后端 未结 5 1999
伪装坚强ぢ
伪装坚强ぢ 2020-12-30 11:08

I\'m still learning about methods in Java and was wondering how exactly you might use an instance method. I was thinking about something like this:

public vo         


        
5条回答
  •  时光说笑
    2020-12-30 11:32

    *An instance method * is a method is associated with objects, each instance method is called with a hidden argument that refers to the current object. for example on an instance method :

    public void myMethod  {
          // to do when call code
    }
    

提交回复
热议问题