Class In Java Programming Explain With Examples

What Is Class In Java Programming Explain With Examples ?
Class In Java:
We can say Class is the father of object, in class we can create lots of objects.
In another way we say Collection of object is class. 
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4MZhh7qz0sMBl9_obfkfX1ZNvU68Xnzh0Q5BkD0T8eUX2IahAf29A-rdtgbyeEmDJru9PenuMxHOSLAP61BFHzXqsQzNrAczB47Yby3Y5zg_9hXceqE59A4vN2ywCAFCoypXocm2H094/s1600/rsz_campusnikalo_zpse94f2923.jpg 
                              Class is a collection of object.

                            Object is collection of Data & Action

"Data is collection of data types" & "Action is collection of what kind of action that data perform" .

For Ex: If we take Vehicals as a class.
 Then Objects will be:Car, Bus, Train.
In Object Data Member will be if we take car as a object: Color, Size, Weight, Dimension.
In Object Data Function will be if we take car as a object: Motion.

Labels: