JAVA Programming Basic


JAVA is a robust, portable and highly secured programming language created by James Gosling at a company named Sun Microsystems, Inc. in 1991. The official name of this is OAK, Sun Microsystems renamed it JAVA in 1995. This company was taken over by Oracle Corporation. It is an all-purpose programming language and it is also an object-oriented programming language. JAVA is a widely used programming language in modern days. It contains various safeguards intended to prevent crashes at the time of program running such as Collection of garbage- no invalid addresses, checking of array and string boundaries, there is no pointer math, Exceptions and interfaces, do not run to improper method addresses.

Editions of JAVA

The capabilities of JAVA vary depending on the editions. JAVA can be found in three different forms or we can say editions −

Java Standard Edition (JSE)

It is a computer platform which permits us to run programs. It can be used for the creation and distribution of portable code servers and desktop settings. It uses JAVA as its main programming language. It belongs to the family of software platforms of JAVA.

It offers all of the libraries and APIs, including java.lang, java.net, java.math, java.util, java.io, etc.

Java Enterprise Edition (JEE)

It is a collection of requirements that encircle Java SE (Standard Edition). it is used to make large programs that manage heavy traffic and complex circumstances that run on the server

Java EE is mainly employed in E-Commerce, accountancy, financial transaction systems, etc.

Java Micro Edition (JME)

It is used to compute applications for small devices such as boxes, mobile phones, and appliances. It is an object-oriented edition. It has great security and built-in protocols.

Applications made by this are portable in nature and can also leverage the native capabilities of the device.

Types of JAVA Applications

Java is the most popular programming language so it has n number of applications. Some of them are listed below −

Enterprise Applications

Java is the first choice for developers for creating applications and it is a well-liked platform with various capabilities such as offering API and runtime environment for scripting. Web services and applications are also included. It is widely used by banks, or for financial and accountancy departments.

In simple words, it is an application which is distributed in an environment called enterprise applications

Web Applications

It is used to make web applications and used by web applications. It offers extensive support to developers for creating web applications. Any type of application can be created by these technologies. It consists of simple coding with high security.

It is used to create applications for education, social security, insurance, health sectors, small community, etc.

Mobile Applications

It is considered the official program for creating mobile applications. It collaborates with programs like Android Studio and Kotlin. Its running depends on Java Virtual Machine (JVM) whereas Android runs class files on Dalvik Virtual Machine (DVM).

It depends on the concept of Object-Oriented programming. And these files are assembled in Android Application Package (APK).

Gaming Applications

It has the support of an open-source 3D-Engine. It is a widely used application in modern times. It is considered the programming language mainly for gaming applications.

It is used to create gaming applications. It consists of long coding and takes time it lacks garbage collection but this problem can be solved by using the version for this application.

JAVA Platform

Java platform is a group of tools which helps us to create various applications easily with high-security service. Applications created by this use JAVA programming language to create code for running the application effectively.

Many Java platforms are developed to ensure that Java functions run equally without any difficulty. It is a collection of libraries, compilers, virtual machines and all other components.

It also provides extra libraries when needed in the program. It consists of a Java development kit, a Java language compiler, a Java run-time environment, a just-in-time compiler, etc.

Features of JAVA

Java is a commonly used programming language for creating different types of applications. Some of them are listed here −

  • Straight-Forward and Well-Known

Java is an easy language to understand, create, and learn. It consists of clear, concise, and basic grammar. Java does not provide pointer overloading or operator overloading.

  • Object-Oriented

It consists of at least one class and object. It provides everything as an object so it consists of some data and behaviour

  • Robust

It uses garbage collection as a strong management system. Its way of handling and exception make it more effective and robust in nature which helps developers to easily create applications.

  • Secure

It has no explicit program runs in the virtual machine which makes it a highly secured programming language.

  • Platform- Independent

Java provides its users with a platform-independent feature. So it provides a commitment that codes written in Java can be run on any machine.

OOPs (Object Oriented Programming Systems)

A large problem might be solved with an object-oriented programming system by being divided into smaller objects. In OOPs, we use objects and classes to develop programs. The object makes it easier to develop the program.

Class

It acts as a prototype or template which contains an object’s data members and methods. It is the instance of an object. It is used to define the class object.

SYNTAX

class ClassName{
   // class body
}

Object

An object has a distinct identity, behaviour and properties. It is used to define the object class. The state of an object can be defined by data fields with their values.

SYNTAX

ClassName object = new ClassName();

Abstraction

An abstraction is a unique technique for hiding unnecessary information in the program. It is used to define the abstract class in the program.

SYNTAX FOR ABSTRACT CLASS

abstract class A{}

SYNTAX FOR ABSTRACT METHOD

abstract void printStatus();// no method body and abstract

Encapsulation

It is used to combine data and functions into one form or entity. Java bean is a completely encapsulated class.

SYNTAX

<Access_Modifier>class<Class_Name{
   private<Data_Members>;
   private<Data_Methods>;
}

Inheritance

It is used to extend keywords to create inheritance. We can gain all the features of other classes through this mechanism.

SYNTAX

class Subclass-name extends Superclass-name {
   // methods and fields
}

Polymorphism

It has the capacity to manifest in several ways. In simple words, we can perform one action in many ways is known as polymorphism.

SYNTAX

class A{}
Class B extends A{}

Conclusion

JAVA is an object-oriented programming language used to develop different types of applications. It has three main editions namely, java standard edition, java enterprise edition, and java micro edition. Java is a simple language to understand which gives high-security options to developers. It is also a platform-independent language.

Updated on: 18-Jul-2023

75 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements