lundi 21 juin 2021

return/pass object reference from a method for non primitive data types/structures

Apart from the primitive datatypes since most of the Java data types/data structures are objects then what can be the reason for the return statement of a method? Passing object references as an actual parameter shall do an exact task. Then when we do a return from methods and when we shall pass an object references to a method?

Aucun commentaire:

Enregistrer un commentaire