Java was earlier known as OAK, developed by James Gosling at Sun Microsystems and released in the year 1995.
Java is primarily a class-based “object-oriented programming language” or OOP as it is commonly known. Much of the syntax of this language are different derivatives of C and C++.
It has a virtual machine platform that makes it possible for you to create compiled programs that can smoothly function on any platform. Java operates on the principle of ‘Write Once, Run Anywhere’ (WORA). It means that it allows application developers to compile Java code that runs on all the platforms that support Java without having to recompile the code.
For Example, A Java program written and compiled on UNIX can run on Mac, Microsoft Windows or UNIX machine without making any modifications to the source code.
Another significant feature of Java is its automatic garbage collector meant to manage memory in the object lifecycle. Once there are no more references to the object, the memory automatically gets freed by the garbage collector.
- Dynamic script creation
- Variable parameter lists
- Run-time object construction
- Function variables
- Source code recovery
- Object Introspection
|This is a standalone language.||This integrates with HTML content and thus contained within a web page.|
|File extension is ‘.Java’.||File extension is ‘.js’.|
|A strongly typed language in which variable is checked at compile-time.||A weakly typed language that has much relaxed rules and syntax.|
Types of Applications That Run on Java
1. Web Applications:
Owing to the high security and easy programming capability offered by Java language, numerous government applications for education, insurance, health, and more are based on Java. The language is also popularly used for eCommerce web applications.
2. Mobile Applications:
Most apps on the popular mobile operating system Android are scripted in Java language using Android Software Development Kit (SDK).
3. Desktop GUI Applications:
Java helps in GUI development through various means including – Swing, Abstract Windowing Toolkit (AWT) and JavaFX.
4. Scientific Applications:
Java is the preferred choice for most developers for applications that involve mathematical operations and scientific calculations.
- Display time and data
- Open and close new frames/windows
- Display dialogue boxes and popup windows
- Build responsive forms
- Build a dynamic drop-down menu
- Display clock
- Destructuring Assignment
- Default Parameters
- Multi-Line Strings
- Arrow Functions
- Template Literals