0% found this document useful (0 votes)
144 views

Java Vs Javascript

Java is a multi-platform, object-oriented programming language that was first released in 1995, while JavaScript is a scripting language used to make web pages interactive. Some key differences are that Java is strongly typed and compiled, while JavaScript is weakly typed and interpreted by browsers. Both languages are widely used - Java for applications like Android apps and enterprise software, while JavaScript is used for front-end technologies and Node.js server-side programming.

Uploaded by

Garry p
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views

Java Vs Javascript

Java is a multi-platform, object-oriented programming language that was first released in 1995, while JavaScript is a scripting language used to make web pages interactive. Some key differences are that Java is strongly typed and compiled, while JavaScript is weakly typed and interpreted by browsers. Both languages are widely used - Java for applications like Android apps and enterprise software, while JavaScript is used for front-end technologies and Node.js server-side programming.

Uploaded by

Garry p
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

What is Java?

Java is a multi-platform, object-oriented, and network-centric, programming language.


It is among the most used programming language. It also used as a computing
platform, and it was first released by Sun Microsystem in 1995. It was later acquired
by Oracle Corporation.

In this JavaScript vs Java tutorial, you will learn:

 What is Java?
 What is JavaScript?
 Features of Java
 Features of JavaScript
 Application of Java
 Application of JavaScript
 JavaScript vs Java
 Advantage of Java
 Advantages of JavaScript
 Disadvantages of Java
 Disadvantages of JavaScript

What is JavaScript?
JavaScript is a scripting language that helps you create interactive web pages. It
follows the rules of client-side programming, so it runs in the user's web browser
without the need for any resources form the web server. You can also use JavaScript
with other technologies like REST APIs, XML, and more. Nowadays JavaScript also
using technologies like Node js.

KEY DIFFERENCES:
 Java is a multi-platform, object-oriented, and network-centric, programming
language whereas JavaScript is a scripting language that helps you create
interactive web pages.
 Java is a strongly typed language while JavaScript is a weakly typed language.
 Java has a file extension ".Java," whereas Javascript has the file extension ".js"
 With Java, you write code once and run it on almost any computing platform,
on the other hand, Java script is a cross-platform language.
 Java is compiled on the server before execution on the client while JavaScript
is interpreted by the client.
 Java is static language while JavaScript is a dynamic language.

Features of Java
Here are the important features of Java.

 Write code once and run it on almost any computing platform


 It is designed for building object-oriented applications.
 It is a multithreaded language with automatic memory management
 Facilitates distributed computing as its network-centric

Here are important features of Java-script:

 It's a cross-platform language


 It's widely used for client-side and server-side
 Strong Testing Workflow
 It's easy to learn and to start coding with
 Added dependencies

Application of Java
Here, are important applications of Java language:

To develop:

 Android Apps
 Enterprise Software
 Scientific Computing Applications
 Big Data Analytics
 Java Programming of Hardware devices
 Used for Server-Side Technologies like Apache, JBoss, GlassFish, etc.

Application of JavaScript
Here, are some important applications of JavaScript:

 Dynamic Single-Page Applications (SPAs)


 Front-End technologies like jQuery, AngularJS, Ember.js, ReactJS are based on
Java Script
 Server-Side technologies like Node.js, Express.js, MongoDB are based on Java
Script.
 Mobile App Development using PhoneGap, React Native, etc.

JavaScript vs Java
A major difference Java and JavaScript is that Java is compiled and interpreted
language while JavaScript code is directly executed by the browser

Parameters Java Java script


Java is a strongly typed language, so JavaScript is a weakly typed language,
Variable
the variable should be declared first so its variable can be declared where
Definition
before using in the program. they are used.
It is an object-oriented programming
Type of language It is an object-based scripting language
language.
Objects of Java are class-based, so
Type of object you can't create any program in java Objects are prototype-based.
without developing a class.
Extension It has a file extension ".Java". It has file extension ".js"
It is interpreted as well as complied.
All browser has the JavaScript
Compilation Java translates source code into
interpreter, which allows you to
process bytecodes. It is executed by
execute JavaScript code.
JVM(Java Virtual Machine).
Parameters Java Java script
Compiled on the server before Interpreted (not compiled) by the
Process
execution on the client. client.
It is object-based. Code uses built-in,
Object-oriented. Applets consist of
Code type extensible objects but not uses any
object classes with inheritance.
classes or inheritance.
Syntax Data types must be declared. Data types not declared.
Type of language Static Dynamic
 Can be used on
 Great libraries
frontend/backend
 Widely used
Key Features  It's everywhere
 Excellent tooling
 Lots of great frameworks

Famous Company
Airbnb, Uber Technologies, Netflix,
using the Reddit, eBay, Coursera.
Instagram.
Technology
<html>
<head>
class A { <title>My First JavaScript code!!!
public static void main(String </title>
args[]){ <script>
Code System.out.println("Hello alert("Hello World!");
World"); </script>
} </head>
} <body>
</body>
</html>
The average salary for a Java The average salary for a JavaScript
Salary Developer is $103,464 per year in Developer is $113,615 per year in the
the US. US.
TOBIE Rating 1 6

Advantage of Java
Here, are benefits/ pros of using Java

 Detailed documentation is available.


 A large pool of skilled developers available
 Huge array of 3rd party libraries
 It allows you to form standard programs and reusable code.
 It is a multi-threaded environment that allows you to perform many tasks at the
same time in a program.
 Excellent performance
 Easy to navigate libraries

Advantages of JavaScript
Here, are pros/benefits of using JavaScript

 It is an open-source project with Microsoft's patronage


 Specially designed tool for small scripts
 Supports classes, interfaces, & modules.
 Compiled JavaScript runs in any browser
 Allows cross-compilation
 You can extend JavaScript for writing large apps
 You can use JavaScript to store and retrieve information on the user's computer
 Immediate feedback to the visitors
 It allows you to create interfaces that react when the user hovers using mouse.

Disadvantages of Java
Here, are cons/drawback of using Java language

 JIT compiler makes the program comparatively slow.


 Java has high memory and processing requirements. Therefore, hardware cost
increases.
 It does not provide support for low-level programming constructs like pointers.
 You don't have any control over garbage collection as Java does not offer
functions like delete(), free().

Disadvantages of JavaScript
Here, are drawbacks/cons of using JavaScript
 Client-side JavaScript does not allow the reading or writing of files. It has been
kept for security reasons.
 JavaScript can't be used for networking applications because there is not much
support available.
 JavaScript doesn't have any multithreading or multiprocessor features.

You might also like