+ 1

How to know the function of a method just by looking at the return type of that method

my teacher know what will the predefine function will do just by looking at the return type

15th Mar 2018, 1:32 PM
Thomas Oviedo
Thomas Oviedo - avatar
4 Answers
+ 5
its not possible unless its as simple as return i*j; or juat seeing i*j and saying yep thats going to return an interger.
15th Mar 2018, 2:15 PM
D_Stark
D_Stark - avatar
+ 5
@thomas yes thats right he could say what will be returned but he wouldent know what the function is doing just by looking at the functions return.
15th Mar 2018, 2:29 PM
D_Stark
D_Stark - avatar
+ 3
Wow! I also want to know that... Great question.
15th Mar 2018, 1:35 PM
Pravin Pandey
Pravin Pandey - avatar
+ 2
His teaching us android studio. He will know what method wikl be called according to return type either void int string or bool
15th Mar 2018, 2:18 PM
Thomas Oviedo
Thomas Oviedo - avatar