Java – A robust Language

Java - A robust Language

Welcome Learners. In this post Java – A robust Language, you will learn about java language, history and properties of java. You can also refer to my previous posts Performance Analysis-Time and Space Complexity, Two Pointers Technique/Approach if needed.

Introduction to Java – A robust Language

History of java

James gosling developed Java in 1991. He developed it as part of a project called green talk. It is about appliances like television, set-top boxes etc. Initially the name of java is Oak, but later renamed to java.

Features of Java

Java - A robust Language
  • Object oriented
  • Simple
  • Secured
  • Platform independent
  • Robust
  • Portable
  • Architecture Neutral
  • Dynamic
  • Interpreted
  • High performance
  • Multithreaded
  • Distributed

Object oriented concepts

  1. Class
  2. Object
  3. Inheritance
  4. polymorphism
  5. abstraction
  6. Encapsulation
  1. Class: Class is a template of blueprint of an object. It defines properties and methods of an object.

2.Object: object is an instant of a class. It is any real world object, thing etc.

3.Inheritance: Inheritance is nothing but acquiring parent class properties by the child class. It is the most important property of object oriented programming. You can get properties of parent class just by inheriting it by the child class.

4. Polymorphism: Polymorphism is the property of having many forms. Poly means many and morpho means forms.

5. Abstraction: Abstraction is hiding unwanted data. It is nothing but making only required data visible and hide the implementation. It makes the job of user easy by hiding complicated things.

6. Encapsulation: Encapsulation is just a process of combining both code and data together. It is named as encapsulation because of the word capsule. As capsule is a collection of several medicines. Which means several medicines are combined inside a capsule.

All of these object oriented principles together make the java programming language.

Constructor

A class can contain constructor, variables, methods etc.

Constructor initializes the object. Whenever you create an object of a class, Java calls its constructor. Every class has a default constructor. You can override the default constructor to initialize your object.

Constructor must have same name as the class name and it should not return anything. Hence it will not have any return type.

Practice java