What is the difference between Java and JavaScript?

12 votes
Anonymous User asked 08-Dec-2017 in programming by Anonymous User

What is the difference between Java and JavaScript?

1 Answer

2 votes
Anonymous User answered 19-Dec-2017 by Anonymous User

What is the difference between Java and JavaScript?

JAVA and JavaScript are similar as well as distinct totally on the ways they treat each other.  

Talking about their clan:
JAVA was devised by James Gosling of Sun Microsystems which is an Object-Oriented Programming Language whereas JavaScript was devised by the group at Netscape which is a scripting language hence, known as the LiveScript. It is just not finished here, JavaScript is a kin of JAVA so thus, it is considered under the category of Object-Oriented Programming Language which gives a conclusion to a fact that many of their structure in programming are analogous. But, Java has a more complex structure of programming than JavaScript which leads to a greater attention-grabbing language to be learned by the weekend programmer.
You might ponder what OOPs implies at this point. Object-Oriented Programming is a generally new idea, though the chunks of a program make up the entirety. Consider it along these lines: you are building a model car. You construct the engine first. It can remain solitary. It is an engine and everybody can see it's an engine. Next, you assemble the body. It can likewise remain solitary. At last, you manufacture the inside including the seats, controlling wheel, and so forth. Each, without anyone else, is an object. In any case, it isn't a completely working car until the point when every one of the pieces is assembled. The entirety of the objects (parts) makes up the entirety.
Proceeding with the model car-case, when you fabricated the engine, you didn't utilize any of the parts that would later form the seats (a 350 four-barrel engine with a safety belt standing out if the cylinder would look entirely senseless). The fact of the matter is that every one of the parts that made up the engine was of a specific class of parts. They all went together. Same with the body and afterward the inside.
The fact of the matter is that in these languages, you assemble objects out of classes of orders to make the entirety. Comprehend the wording? Great. Moving along...

JAVA and JavaScript are distinct creatures:
Tailing about the fact that how these two are different. The huge difference in JavaScript needs to be embedded in with the HTML documents to run ahead whereas JAVA is a standalone language which is further been used to create a standalone application too. A JAVA applet is the fully enclosed program. JavaScript is a text that is been fed to the web browser that can thus be enacted by the browser. Another differential factor is the presentation of the language to the end user. JAVA is compiled over the machine language prior to the layout over the Web thus, the semantics explains that post the program is been checked for errors, then the code is been transferred to a different computer for converting it to a low-level language.  
JavaScript is content based. You compose it to an HTML record and it goes through a program. You can change it after it runs and runs it over and over. Once the Java is compiled, it is set. Without a doubt, you can backpedal to the first content and adjust it, yet then you have to compile once more.
Java applets run autonomously of the HTML archive that is calling for them (and Java is likewise what runs numerous machines and cell phones, and does not require a web program). Of course, they show up on the page, yet the HTML record did minimal more than require the application and place it. In the event that the software engineer permits it, in many cases, parameters can be set by the HTML report. This incorporates the foundation shade of the applet of the sort of content it shows, and so forth. The conveyance of the applet is done through a download. The HTML report requires the application, it downloads to the client's cache and holds up to run. JavaScript is entirely dependent on the program to comprehend it and influence it to wake up.

This was all about the differences in JAVA and JavaScript...

Hope, this would have been quite helpful for your...


Anonymous User commented 27-Dec-2017 by Anonymous User
Thanks akriti
Anonymous User commented 22-Jul-2019 by Anonymous User
Thanks for the details.