What gives a class property a field in Java?

To get a write property, create a method using the following characteristics: Because the method is used to communicate with the outside world, it must be created as public. Because the method is used by outside classes to assign a value to the field, the method is (or should be) created as void.

Sizin İçin Seçtik  What is the use of field class in Java?

Leave a Reply

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