What is method declaration in Java?

Java requires that a method declare the data type of the value that it returns . If a method does not return a value, it must be declared to return void . Methods can return either values of primitive data types or of reference data types.

Sizin İçin Seçtik  What are the predefined methods?

Leave a Reply

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