top of page
Writer's pictureAnupam Kanoongo (Writer)

Java and JavaScript



In this wide world, Java is known for two different names that are Java and JavaScript.

These both are different from each other and we are going to discuss them separately.

Firstly, Java :

Java is an object-oriented programming language and has a virtual machine platform that allows you to create compiled programs that run on nearly every platform.

Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995. James Gosling is known as the father of Java. Before Java, its name was Oak. Since Oak was already a registered company, so James Gosling and his team changed the name from Oak to Java.

Features of Java:

  • Platform Independent: Compiler converts source code to bytecode and then the JVM executes the bytecode generated by the compiler. This bytecode can run on any platform.

  • Object-Oriented Programming Language: Organizing the program in the terms of collection of objects is a way of object-oriented programming, each of which represents an instance of the class. There are 4 pillars of OOP’s concept:

    • Abstraction

    • Encapsulation

    • Inheritance

    • Polymorphism

  • Simple: Java is one of the simple languages as it does not have complex features like pointers, operator overloading, multiple inheritances, Explicit memory allocation.

  • Robust: Java language is robust that means reliable. It is developed in such a way that it puts a lot of effort into checking errors as early as possible, that is why the java compiler can detect even those errors that are not easy to detect by another programming language.

  • Secure: In java, we don’t have pointers, and so we cannot access out-of-bound arrays i.e. it shows ArrayIndexOutOfBound Exception if we try to do so.

  • Distributed: We can create distributed applications using the java programming language. Remote Method Invocation and Enterprise Java Beans are used for creating distributed applications in java.

  • Multithreading: Java supports multithreading. It is a Java feature that allows concurrent execution of two or more parts of a program for maximum utilization of CPU.

Example: This is the basic Java program.

Applications of Java:

  1. Desktop Applications such as acrobat reader, media player, antivirus, etc.

  2. Web Applications such as irctc.co.in, javatpoint.com, etc.

  3. Enterprise Applications such as banking applications.

  4. Mobile

  5. Embedded System

  6. Smart Card

  7. Robotics

  8. Games, etc.

Types of Java Applications


There are mainly 4 types of applications that can be created using Java programming:


1) Standalone Application :

Standalone applications are also known as desktop applications or window-based applications. These are traditional software that we need to install on every machine. Examples of standalone applications are Media players, antivirus, etc. AWT and Swing are used in Java for creating standalone applications.


2) Web Application :

An application that runs on the server-side and creates a dynamic page is called a web application. Currently, Servlet

, JSP

, Struts

, Spring

, Hibernate

, JSF

, etc. technologies are used for creating web applications in Java.


3) Enterprise Application :

An application that is distributed in nature, such as banking applications, etc. is called an enterprise application. It has advantages like high-level security, load balancing, and clustering. In Java, EJB

is used for creating enterprise applications.


4) Mobile Application :

An application that is created for mobile devices is called a mobile application. Currently, Android and Java ME are used for creating mobile applications.



Java Platforms / Editions

There are 4 platforms or editions of Java:


1) Java SE (Java Standard Edition)

It is a Java programming platform. It includes Java programming APIs such as java.lang, java.io, java.net, java.util, java.sql, java.math etc. It includes core topics like OOPs, String

, Regex, Exception, Inner classes, Multithreading, I/O Stream, Networking, AWT, Swing, Reflection, Collection, etc.


2) Java EE (Java Enterprise Edition)

It is an enterprise platform that is mainly used to develop web and enterprise applications. It is built on top of the Java SE platform. It includes topics like Servlet, JSP, Web Services, EJB, JPA

, etc.


3) Java ME (Java Micro Edition)

It is a micro platform that is dedicated to mobile applications.


4) JavaFX

It is used to develop rich internet applications. It uses a lightweight user interface API.


Secondly, JavaScript :


JavaScript (js) is a lightweight object-oriented programming language that is used by several websites for scripting the webpages. It is an interpreted, full-fledged programming language that enables dynamic interactivity on websites when applied to an HTML document. It was introduced in the year 1995 for adding programs to the webpages in the Netscape Navigator browser. Since then, it has been adopted by all other graphical web browsers. With JavaScript, users can build modern web applications to interact directly without reloading the page every time. The traditional website uses js to provide several forms of interactivity and simplicity.

Although, JavaScript has no connectivity with the Java programming language. The name was suggested and provided in the times when Java was gaining popularity in the market. In addition to web browsers, databases such as CouchDB and MongoDB uses JavaScript as their scripting and query language.


Features of JavaScript :

There are the following features of JavaScript:

  1. All popular web browsers support JavaScript as they provide built-in execution environments.

  2. JavaScript follows the syntax and structure of the C programming language. Thus, it is a structured programming language.

  3. JavaScript is a weakly typed language, where certain types are implicitly cast (depending on the operation).

  4. JavaScript is an object-oriented programming language that uses prototypes rather than using classes for inheritance.

  5. It is a light-weighted and interpreted language.

  6. It is a case-sensitive language.

  7. JavaScript is supportable in several operating systems including, Windows, macOS, etc.

  8. It provides good control to the users over the web browsers.

History of JavaScript

In 1993, Mosaic, the first popular web browser, came into existence. In the year 1994, Netscape was founded by Marc Andreessen. He realized that the web needed to become more dynamic. Thus, a 'glue language' was believed to be provided to HTML to make web designing easy for designers and part-time programmers. Consequently, in 1995, the company recruited Brendan Eich intending to implement and embed Scheme programming language to the browser. But, before Brendan could start, the company merged with Sun Microsystems for adding Java into its Navigator so that it could compete with Microsoft over the web technologies and platforms. Now, two languages were there: Java and the scripting language. Further, Netscape decided to give a similar name to the scripting language as Java's. It led to 'JavaScript'. Finally, in May 1995, Marc Andreessen coined the first code of JavaScript named 'Mocha'. Later, the marketing team replaced the name with 'LiveScript'. But, due to trademark reasons and certain other reasons, in December 1995, the language was finally renamed to 'JavaScript'. From then, JavaScript came into existence.


Application of JavaScript

JavaScript is used to create interactive websites. It is mainly used for:

  1. Client-side validation,

  2. Dynamic drop-down menus,

  3. Displaying date and time,

  4. Displaying popup windows and dialog boxes (like an alert dialog box, confirm dialog box, and prompt dialog box),

  5. Displaying clocks etc.


This article will explain Java and JavaScript in a very simple manner. Please watch it carefully for easy understanding.


Hence, this will introduce you to Java and JavaScript. To learn it in brief check out our Youtube Channel for a complete video of Java and JavaScript.


Also, visit our Social Pages:


Do Like, Share & Subscribe to all our pages if you find them helpful



3 views0 comments

Recent Posts

See All

Comments


bottom of page