So ive learned some basic python programming and was learning some Java through some books. I was trying out some pretty basic coding examples on eclispe and i had a question about the return statement
in Python a return statement in a function for example would output something to the screen for instance in python if a function was : def test(x): return x and i tested with test(4) integer 4 would output to the screen. Does return work the same way in java?
test(4)evaluates to 4 (since 4 is returned), and that's why 4 is printed. Return works the same in Python and Java.