Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Adam Smallman
Adam Smallman
4,182 Points

Eclipse Java and html based Java

What is the difference in the code? What I mean is when creating an Android app, or java application how does it differ from Java that can be found on html, like that found in the Programming fundamentals.

I have created a easy android app (with the help of youtube) I have also gone through much of the Java lessons on Treehouse. Simply typing

((( alert("A Word"); )))

into eclipse is not going to be accepted but in html it makes the browser pop up a box.

Hope this makes sense!

1 Answer

Stone Preston
Stone Preston
42,016 Points

Java and Javascript are 2 completely different languages. They are not the same. Syntax is different, lots of things are different.

From http://www.java.com/en/download/faq/java_javascript.xml

Listed are key differences between the Java and JavaScript. Java is an OOP programming language while Java Script is an OOP scripting language. Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only. Java code needs to be compiled while JavaScript code are all in text. They require different plug-ins.

Adam Smallman
Adam Smallman
4,182 Points

Ah I did not know that, I thought that is was just preference to what the person wanted to call it, Java or JavaScript. Thank you!