Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

We all know those people, who don't differentiate Java from JavaScript. Yet when you try to explain it technically, they don't understand.

Then, how to explain difference between those two languages in the way that everyone could understand it?

share|improve this question
 
I don't know a single person who doesn't differentiate Java from JavaScript. Those two languages are so different in their concepts and implementations that it should be easy enough to point out the most important things. I would start with the typing discipline, Java's strong static type system makes it nearly the opposite of JavaScripts dynamic duck typing. (actually those languages do not have much more in common than the Java part in the name and even that was not much more than a marketing ploy) –  thorsten müller Feb 11 at 9:40
1  
@thorstenmüller And that ploy is a total pain when I have javascript on my resume, and get emails/phone calls from recruiters with java jobs –  Ozz Feb 11 at 9:47
 
You have to tailor your message to the audience. What are you trying to tell them, and why? Have you been asked this specific question? Or is this part of a larger discussion about another topic? –  kevin cline Feb 11 at 9:48
1  
What is the context? Do they get browser errors, asking why they have to install the Java Runtime or do they want to learn how to program? –  JeffO Feb 11 at 10:56
 
I'm just gonna go all meta here. Ask yourself first, what KIND of differences you want to showcase? Platform differences (one runs in your browser, the other on your computer - tho that's becoming blurry lately)? Workflow/coding differences (one can be "written" and immediately ran in your browser, the other needs a compiler)? What they're most often used for (one is used heavily in the special effects of the Facebook and Google+ pages, the other most likely is used to manage the employees records at your work place)? Which one's easier to learn (??? vs ??? :D ). –  Shivan Dragon Feb 11 at 11:12
add comment

closed as too broad by gnat, Konrad Morawski, MichaelT, GlenH7, user16764 Feb 12 at 0:04

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

I will just copy-paste a well-known answer:

Java and Javascript are similar like Car and Carpet are similar.

That's pretty much it. The languages are completely different, the only similarlity is in the names, and the fact that they're both programming languages.

share|improve this answer
1  
This will let people know they are different, but not what the difference is. See - I didn't have to downvote your answer, because I believe you can improve. –  Den Feb 11 at 9:55
 
@Den because it's easier to list the similarities than the differences. –  Florian Margaine Feb 11 at 9:55
4  
@Den Many many people who don't know that they are different don't need to know how they are different, because they are not programmers. –  delnan Feb 11 at 10:48
add comment

There is little point trying to explain to laypeople how different two programming languages are. Compilers, interpreters, strong typing, weak typing - that's all completely vacuous gobbledygook to them.

What they might understand is the concept of 'copycats' jumping on a bandwagon. So your best bet could be to compare what Netscape did to a well-known non-computing example, e.g. 'Flavr-Aid' imitating 'Kool-Aid'.

share|improve this answer
 
Interesting explanation. But somehow Netscape never really tried to copycat Java. The two languages are so different that this example would leave a totally wrong impression. –  thorsten müller Feb 11 at 9:47
1  
I'm not too good with American, or indeed Polish, popular culture... What's a good example of a physical product trying to capitalize on another's reputation by imitating its name and not so much its actual properties? –  Kilian Foth Feb 11 at 9:51
 
In Poland we once had EKKO icecream : ) Not quite mimicking some actual product, but surely jumping on a bandwagon of a buzzword (the implied ecological qualities of the icecream remain unknown to this very day) –  Konrad Morawski Feb 11 at 10:02
 
@KilianFoth Maybe "Telekomunikacja Telepolska" (Telepolish Telecom) imitating "Telekomunikacja Polska: (Polish Telecom). –  Cysioland Feb 11 at 14:41
1  
Uhm. Actually, it was Sun who approached Netscape to change the name from LiveScript to JavaScript so that they could capitalize on LiveScript's popularity, not the other way round. –  Jörg W Mittag Feb 11 at 16:07
add comment

The mantra I use is:

Java is to JavaScript like Ham is to Hamster.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.