+ 4

JavaScript and java are different? How examples??

plz give example relevant both

17th Oct 2017, 12:46 PM
Ankit Kumar
Ankit Kumar - avatar
10 Answers
+ 18
names🙃😀
17th Oct 2017, 3:45 PM
\__(° = °)__/
+ 8
Well, dogs and hotdogs aren't the same things, are they?
17th Oct 2017, 1:57 PM
hmysjiang🍀
hmysjiang🍀 - avatar
+ 5
Ham and hamster, car and carpet. They are different things.
17th Oct 2017, 4:04 PM
Calviղ
Calviղ - avatar
+ 5
They do have some keywords in common, but Java is a high-level programming language, whereas JS is a scripting language. JS is interpreted rather than compiled.
18th Oct 2017, 5:50 PM
David Fuqua
David Fuqua - avatar
+ 4
Adding to what others have mentioned already, one major difference that immediately comes to mind is Javascript uses prototypal inheritance where as Java uses hierarchical inheritance. These two inheritance paradigms make the two platforms fundamentally different in so many ways. Also, in Javascript, functions are a first class citizen over class types. Functions are used to define object prototypes and the object constructor. In Java, class types are used to define objects. One other major difference is the context of the keyword "this" is set very differently in the two languages. There is much more I can add. Hopefully, this was helpful.
24th Oct 2017, 5:56 AM
David Carroll
David Carroll - avatar
+ 3
Raj, who are you asking?
22nd Oct 2017, 4:46 PM
David Fuqua
David Fuqua - avatar
+ 2
hey are you using any social media
22nd Oct 2017, 4:41 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
They have nothing in common apart of the name similarity. What kind of example do you want?
17th Oct 2017, 1:01 PM
deFault
+ 1
@david fuqua
22nd Oct 2017, 4:50 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
@david fuqua thank you very much
22nd Oct 2017, 5:03 PM
Raj Chhatrala
Raj Chhatrala - avatar