What is the difference between java and java script? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between java and java script?

i am a new learner. so i have a lot of questions. i started learning java in sololearn. if u can explain me the difference between java and java script in easy words it will really help me.

3rd Apr 2018, 2:36 PM
Afraim Ahmed
Afraim Ahmed - avatar
10 Answers
+ 2
Here are some differences between the two languages: Java is a statically typed language; JavaScript is dynamic. Java is class-based; JavaScript is prototype-based. Java constructors are special functions that can only be called at object creation; JavaScript "constructors" are just standard functions. Java requires all non-block statements to end with a semicolon; JavaScript inserts semicolons at the ends of certain lines. Java uses block-based scoping; JavaScript uses function-based scoping. Java has an implicit this scope for non-static methods, and implicit class scope; JavaScript has implicit global scope. Here are some features that I think are particular strengths of JavaScript: JavaScript supports closures; Java can simulate sort-of "closures" using anonymous classes. (Real closures may be supported in a future version of Java.) All JavaScript functions are variadic; Java functions are only variadic if explicitly marked. JavaScript prototypes can be redefined at runtime, and has immediate effect for all referring objects. Java classes cannot be redefined in a way that affects any existing object instances. JavaScript allows methods in an object to be redefined independently of its prototype (think eigenclasses in Ruby, but on steroids); methods in a Java object are tied to its class, and cannot be redefined at runtime. More on .... http://net-informations.com/js/default.htm
29th May 2018, 5:06 AM
rahul kumar
rahul kumar - avatar
+ 17
Firstly, those are two totally different languages.Java is very powerfully language which can be used in a lot of ways and it is older than JavaScrip.When js was developed creators used this huge popularity of Java and named theyr language JavaScript to get more users, js is the most powerfull web language.
3rd Apr 2018, 2:44 PM
__Nick
__Nick - avatar
+ 7
so many threads of same kind already exists about fiff. b/w java & javascript //have a look at this https://www.sololearn.com/Discuss/1184818/?ref=app
3rd Apr 2018, 2:49 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 5
javascript is in a nutshell the java of the web, it was invented to be the one scripting language on the web. before javascript there were a few problems and you had to use languages that were slower for the web to load.
3rd Apr 2018, 2:40 PM
TrueJu
TrueJu - avatar
+ 4
https://en.wikipedia.org/wiki/JavaScript Javascript - client-side language for websites to provide interactivity. https://en.wikipedia.org/wiki/Java_(programming_language) Java - programming language that's used to make applications, applets, games, mobile apps, etc... etc... etc... Java does a bit of everything and nearly everywhere.
3rd Apr 2018, 2:41 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
How is JavaScript different from Java? The JavaScript programming language, developed by Netscape, Inc., is not part of the Java platform. JavaScript does not create applets or stand-alone applications. In its most common form, JavaScript resides inside HTML documents, and can provide levels of interactivity to web pages that are not achievable with simple HTML. Key differences between 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. For additional information about JavaScript, visit Mozilla.org https://www.java.com/en/download/faq/java_javascript.xml https://www.codecademy.com/en/forum_questions/4fe46886d5de070003017288
3rd Apr 2018, 2:40 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
+ 1
Though the name are somehow similar they do not have any connections. Java is OOP language whereas javascript is oop scripting language mostly used in Web. https://stackoverflow.com/questions/245062/whats-the-difference-between-javascript-and-java https://www.java.com/en/download/faq/java_javascript.xml If you want to learn website development then learn javascript. If you are just getting started javascript is not a good language to get started..go with java instead.
3rd Apr 2018, 2:42 PM
Bishal Sarang
Bishal Sarang - avatar
+ 1
so that mean java script use for web programing
3rd Apr 2018, 2:43 PM
Afraim Ahmed
Afraim Ahmed - avatar
+ 1
@Afraid Ahmed, JavaScript is played a very important role to make a website more functional.
3rd Apr 2018, 2:51 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
0
thank u mushfiqur
3rd Apr 2018, 2:55 PM
Afraim Ahmed
Afraim Ahmed - avatar