Function = methode in Java?


Hello, ist a function nearly the same like a methode in java?



well, programming language have updates just like any piece of software.

Javascript had a massive update in 2015 (es6, also named emcascript 2015), before es6 there was es5. In es5, there where objects, and within an object we could have methods. in es6, classes where also introduced, which means we could also have methods in a class.

a function has to be outside a class and object in JS.

now, my java knowledge isn’t superb. but i don’t think java has no functions, java only has methods.

so i could see why you see similarities between functions (JS) and methods (java), but its not entirely the same


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.