What is get () in Java?

The get method returns the value of the variable name . The set method takes a parameter ( newName ) and assigns it to the name variable. The this keyword is used to refer to the current object.

Sizin İçin Seçtik  Can you make a list of classes in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *