+ 6
What is the difference between method and function in java?
pls specify with any day to day example??
2 odpowiedzi
+ 8
Answered this a while ago, have a look!
https://www.sololearn.com/Discuss/458470/?ref=app
+ 7
The diiference is mostly semantical. A method is just a function attached to an object: a car would have a start() method, wich would be a function embeded inside the car... wash() could be a function, not linked to a car object specifically (cars doesn't embed such functionnality ^^), but could be also a method for an oven, wich could provide this functionnality ;)