Java Concepts
Java Concepts
Object oriented languages like java provide a structure for the representation of objects and entities. This structure of Object Oriented Programming starts with the a simple collection of "Facts" and "Figures".
Lets take an example of Dog, which is an object from animal family The fact about a Dog, is that it can bark and figure about a Dog is that it has four legs and and it can walk and run due to its figure.
These facts and figures are more commonly known as "Properties" and "Methods" respectivly.
One thing that makes its way here in our minds that an object like Dog can represent all the other similar Dogs of same family, so we can say that an object can represent its whole family.
This word "Family" is more commonly know as "Class" in object oriented programming. So the construction of a an classes help us representing and grouping the uncountable objects of that class or family.
Class
A collection of properties and methods with special structure and access attributes
Let's construct and general form of a class irrespective of the java or any other langauge
Class of Senior Students Start of Class Roll No First Name Last Name Date Of Birth Address Have to Study Mathematics Have to Study Science Have to Studey Geography End of Class
so by the definition of class, the example construction class contains the combination of all the common actions that students perform in a school class
so if we made a student object of this class named "Ali", then the "Roll No, First Name, Last Name, Date Of Birth, Address" are called properties of this student object and all the rest of "Have to ..." named members of class are the methods of this object "Ali"
so in simple meanings: "Ali" is an object of "Senior Students Class" class so he have a Roll No, and all the other properties and methods of "Senior Students Class" |