0
Difference between Java and Javascript and its uses?
i just started learning coding with sololearn apps and they have these two different apps for java AND javascript? When should i pick one instead of another?
2 Answers
+ 3
Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only.
java can also be used to creat android apps
while javascript is used for making websites
+ 1
In past times Java was used in web for creating applets - dynamic widgets with wide functionality.
As a language which will "glue" applets and web pages JavaScript was created.
JavaScript became the most popular way to add dynamic to static HTML (there were some other languages for this purpose, but JS became a winner and have no rivals in this part).
JavaScript and Java are totally different languages with similar syntax.
Using NodeJS you can write server applications using JavaScript.
Using Cordova based frameworks you can write universal mobile apps.
Java is used for server, client or mobile (android) apps. Applets aren't supported by Chrome browser so you can call them dead.