Friday 6 May 2016

What is class in apex,java or in any other programming language ?

When we are starting career in programming the first thing comes in mind what is class and what is use of class.
I hope you have read out many of the posts explaining about class. A class is collection of variables and methods but we still have doubt on CLASS so let me explain with very short and meaningful way.

Class : A Class is custom Data type. 

                                                                  Use Of Class: 

As we know, To store set of characters, we use STRING data type, for numbers use INTEGER datatype and so on... these all are standard data type means already defined by the system. what if we want to store a data which contains one/more standard data types, methods. in this case the system does not understand. which data type can be applicable here. so what do we do we define our own data type which store data accordingly.

I hope you this post may have cleared doubt on CLASS. let me know still you have doubt on class and use of it.