banner18

Java Programming Essentials

 

What is Java? 

Java is an elevated level, broadly useful, object-situated, and secure programming language created by James Gosling at Sun Microsystems, Inc. in 1991. It is officially known as OAK. In 1995, Sun Microsystem changed the name to Java. In 2009, Sun Microsystem takeover by Oracle Corporation. 

Versions of Java 

Every release of Java has various abilities. There are three releases of Java: 

Java Standard Editions (JSE): It is utilized to make programs for a work station. 

Java Enterprise Edition (JEE): It is utilized to do huge projects that sudden spike in demand for the worker and oversees hefty traffic and complex exchanges. 

Java Micro Edition (JME): It is utilized to create applications for little gadgets, for example, set-top boxes, telephone, and apparatuses. 

Java Applications 

There are four kinds of Java applications that can be made utilizing Java programming: 

  1. Standalone Applications: Java independent applications utilize GUI parts, for example, AWT, Swing, and JavaFX. These parts contain catches, list, menu, scroll board, and so forth. It is otherwise called work area estrangements. 
  2. Web Applications: An application that is disseminated in nature is called undertaking applications. 
  3. Enterprise Applications: An application that sudden spike in demand for the worker is called web applications. We use JSP, Servlet, Spring, and Hibernate advances for making web applications. 
  4. Mobile Applications: Java ME is a cross-stage to create portable applications that stumble into cell phones. Java is a stage for App Development in Android. 

Java Platform

Java Platform is an assortment of projects. It assists with creating and run a program written in the Java programming language. Java Platform incorporates an execution motor, a compiler, and a set of libraries. Java is a stage autonomous language. 

Highlights of Java

  • Simple to use: Java is a basic language since its grammar is basic, clean, and straightforward. Unpredictable and vague ideas of C++ are either killed or re-actualized in Java. For instance, pointer and administrator over-burdening are not utilized in Java. 
  • Object-Oriented: In Java, everything is an item/object. It implies it has some information and conduct. A program should have in any event one class and item. 
  • Secure: Java is a safe programming language since it has no unequivocal pointer and projects run in the virtual machine. Java contains a security chief that characterizes the entrance of Java classes. 
  • Platform Independent: Java gives an assurance that code composes once and run anyplace. This byte code is stage autonomous and can be a sudden spike in demand for any machine. 
  • Convenient: Java Byte code can be conveyed to any stage. No usage subordinate highlights. Everything identified with capacity is predefined, for instance, the size of crude information types. 
  • Multithreaded: Java additionally bolsters multi-stringing. It intends to deal with more than one occupation a period. 

 

OOP (Object Oriented Programming System) 

Object arranged writing computer programs is a method of tackling a mind-boggling issue by breaking them into a little sub-issue. An item is a certifiable element. It is simpler to build up a program by utilizing an article. In OOPs, we make programs utilizing class and object in an organized way. 

Class: A class is a format or plan, or model that characterizes information individuals and strategies for an article. An item is the case of the class. We can characterize a class by utilizing the class watchword. 

Object: An item is a certifiable element that can be distinguished particularly. For instance, in a work area, a circle can be considered as objects. An article has special conduct, character, and state. Information fields with their present qualities speak to an item's condition (otherwise called its properties or traits). 

Abstraction: A reflection is a technique for concealing unimportant data from the client. For instance, the driver realizes how to drive a vehicle; there is no compelling reason to realize how the vehicle runs. We can make a class unique by utilizing the catchphrase conceptual. In Java, we utilize dynamic class and interface to accomplish reflection. 

Encapsulation: An embodiment is a way toward restricting information and capacities into a solitary unit. A class is an illustration of exemplification. In Java, the Java bean is a completely embodied class. 

Inheritance: Inheritance is the system wherein one class secures all the highlights of another class. We can accomplish legacy by utilizing the expanded watchword. It encourages the reusability of the code. 

Polymorphism: Polymorphism is the capacity to show up in numerous structures, single activity in an unexpected way. For instance, a kid in the study hall carries on like an understudy; in house acts like a child. There are two kinds of polymorphism: run time polymorphism and aggregate time polymorphism.

Let's create the hello java program:

class MyFirstProgram{  

    public static void main(String args[]){  

     System.out.println("Welcome to Emerging Tech Foundation");  

    }  

}

Parameters used in First Java Program

Let's see the meaning of class, public, static, void, main, String[], System.out.println().

  • The class keyword is used to declare a class in java.
  • The public keyword is an access modifier that represents visibility. It means it is visible to all.
  • Static is a keyword. If we declare any method as static, it is known as the static method. The static method's core advantage is that there is no need to create an object to invoke the static method. The JVM executes the main method, so it doesn't require creating an object to invoke the main method. So it saves memory.
  • The void is the return type of the method. It means it doesn't return any value.
  • Main represents the starting point of the program.
  • String[] args is used for the command-line argument. We will learn it later.
  • System.out.println() is used to print statements. Here, System is a class, out is the object of PrintStream class, println() is the method of PrintStream class. We will learn about the internal working of System.out.println statement later.

Summary

We have learned about the Basics of Java Programming Essentials, which includes concepts, features, object-oriented programming, and writing our first java code. 

  •  January, 26, 2021
  • Rutuja Kawade
POST A COMMENT
We'll never share your email with anyone else.
Save my name, email, and website in this browser for the next time I comment.
Latest Blogs