Friday 6 July 2018

DIFFERENCE BETWEEN JAVA AND JAVASCRIPT.

DIFFERENCE BETWEEN JAVA AND JAVASCRIPT
Key difference betweeen java and javascript.

  • JAVA is an  OOP programming languagae while JAVASCRIPT is a 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.
  • JAVA is a statically types language while JAVASCRIPT is a weakly typed language.
  • Both the languages are interpreted languages ( unlike c, which is compiled to machine code as per the machine on which they run).
  • JAVASCRIPTS supports prototype based objects system, while JAVA is normally typed object system.
  • Java has a well developed "package " system, while  javascript package are not predefined. this has impact on sharing and reusing code.
  • Both the languages support the fundamental requirements of Object Oriented Programming like Encapsulation, Inheritence, Abstraction and Polymorphism. But one being a "statically"  typed and the other "dynamic" the style and rigor of achieving these are different.
  • Both the language support certain aspects of functional programming the recursion, high order function, first class functions . 
  • Java has a bigger set of basic data structure (different kinds of maps, lists, Sets ) in built into the language compared to javascript. This might have an impact if we want to implement certain algorithm or optimizations.
  • Both the languages are virtual machine based, Unlike C or C++ , in which we submit the program directly to the underlying OS to run, in Javascript and java , we submit the program to the virtual machine to run. the virtual machine is responsible for managing the memory of the program, performing inline optimizations, security of the running programs etc. 

Some Major Differences..

Compiled vs. Interpreted 
                      Java is considered a compiled  programming language. javascript is considered as                                interreted scripting language. The difference is in the implementation. Java is compiled                        into byte code and run on a virtual machine. whereas javascript can  be interpreted                                directly by a browser in the syntax it is written.

Static vs Dynamic Type Checkin
  Java uses static type checking where the type of a variable is checked at compile time.                          The programmer must specify the type ( integer, string, double etc) of any variable they                        create . Javascript, like most scripting language, use dynamic type, where type satisfy                          isverified at run time. It is not required for a programmer to specify the type of any                              variable they create. There are many pros and cons for these two paradigms, but the                              primary advantage of static type checking is that type errors are caught in early                                    development and compiler knows exactly what data type are being used, code typically                        execute faster or uses less memory. The primary advantage of dynamic type checking                           isprogrammer productivity you are free to assign types at your leisure.


Class Based vs Prototype Based.
                      Java follows class based inheritence a top down, hierarichal, class based relationship                            whereby properties are defined in a class and inherited by an instance of that class. In                           Javascript, inheritence is prototypal -all objects can inherits directly from other                                   objects. Hierarchy is accomplished in Javascript by assigning an object as a prototype                            with a constructor function.
 

https://chat.whatsapp.com/LQwOhM1jvx25uNG5LXxU2f
If you are interested in this and want to learn more about Internet Networking Programming language and Technologies then join my whatsapp group by this link.
we buy cars for cash cash for car cash for cars cash cars we buy junk cars buy junk cars sell my junk car near me sell my car for cash sell car for cash sell my car for cash today cash 4 cars we buy cars for cash Car Removals Sydney https://unwantedcarremovalsydney.com.au Cash for Scrap Cars Service Unwanted Car removals Car Removal Sydney Car Removal Car Removals Car Removals Sydney Car Removals Sydney

3 comments:

( DIGITAL INDIA ) DIGITAL NETWORKING SERVICE

DATA COMMUNICATION AND NETWORKING With the advancement of Data Communication facilities the communication between computers has increa...