An Introduction to JAVA

An Introduction to Java

In this article we'll seek into following keypoints.

  • What is JAVA ?
  • OOPC (Object Oriented Programming Concept)
  • JAVA Standards
  • Operators in JAVA
  • Class & Object

1. What is JAVA ?


JAVA is a high-level,general purpose and powerful programming language.

It is object oriented language and mainly based on OOPC (Object Oriented Programming Concept).

JAVA is machine independent.

It was developed at Sun MicroSystems which was purchased by Oracle in 2010.

JAVA is used to develop software that can run on mobile,desktop and servers.

2. OOPC (Object Oriented Programming Concept)

As you know,an object is referred to anything in this world.

in JAVA hierachy,object is at the top of the positions and that's why it is called "Object Oriented Language".

In simply,Object Oriented Programming is a concept that uses  objects for programming.

It basically implements real world entities to programs.

Now-a-days OOPC makes proramming an easy task than earlier.

In earlier times,software developers had to spend long time and much effort to fix bugs and make updates in a source code because they were not written using objects.They were only many many lines of codes.So,it was really a big task to do such things.

As a solution OOPC was introduced.

There are 4 main concepts of OOPC.

                          (i) Abstraction

                          (ii) Encapsulation

                          (iii) Inheritance

                          (iv) Polymorphism

We'll discuss about them later on in our articles.

3. JAVA Standards

In the above, we said that Object is at the highest point of JAVA hierachy.Other that that, there are 3 main levels below it.

They're , 

              1.Class

              2.Method

              3.Variable

Now we are going to understand how to identify those things (Class,Method & Variable) in a JAVA code.



Capital ⇒ 1st letter uppercase ⇒ Class

capital ⇒ 1st letter lowercase ⇒ variable

capital() ⇒ 1st letter lowercase & having a parameter list ⇒ method


4. Operators in JAVA

(i) Dot Operator



The function of the Dot Operator is calling.


(ii) Assignmental Operator

The function of this is assigning values to a variable.

It is not equaling values.

     eg:- String b="abcd";

Here, "abcd" is assigned to the variable "b''. So, the value of "b" can be changed later because "b" is not equal to "abcd".

Then, if we want we can assign another value to it.

    eg:- String b="abcd";

              b="efgh";

Now the value of "b" is "efgh".


(iii) Equalization Operator

In JAVA, the sign "==" is used to equal something to a variable.

  eg:- String a=="abcd";

5. Class and Object

(i) Object

Anything that has properties and behaviours is an object.

For example,a man has many parts in his body.They're properties.

By using them,he can perform various tasks.We can call them behaviours.



(ii) Class

Class is a template or a structure that had been made relevent to a certain object.

In a class, we can make any number of objects by changing values in the class.

For an example,assume that you have to develop a system by including all humans in this world.The population of human in this world is 8Billion.Then you have to create 8Billion objects to do that.

But we can use a class for to indicate that individual human being one by one.

Therefore we can call a class as a template of a certain group of objects.

➡Finally we can summarize this as below.

  • In programming,we use the object as the class,properties as variables and behaviours as methods according to the properties and behaviours of an object.
  • In a class,variables and methods can be used as the same way of existing properties and behaviours in an object.
     

 


So I think you will get an idea about basics of JAVA.

see you in the next article.

thank you !


Comments

Popular posts from this blog

Variable and Method types in JAVA

Polymorphism

Casting