• Class is blue print or template in which object are created.
• We can also say that class is collection of object.
• If you want to use a class then you have to create an object.
• Ex. In our body the part call 'hand' is call class and we divide in two things like 'left hand' and 'right hand' this both is call its object
• Ex. Other example is bird in which we can say that bird is class and sparrow, parrot, duck etc. is calling its objects.
• Object is instance of class.
• Object is showing the properties of class.
• Group of object make class.
How to define class and its object.
public class Student
public string getStudent()
public void setStudent(int roll,string name)
RollNo = roll;
Name = name;
public Static void main()
// make its object
Student objStudent = new Student();
objStudent.setStudent(4, "Nirav Patel");
See Also :
- Android Installation for beginners_Part-1
- Android Installation for beginners
- How to Resize a Partition in Windows 7 or Vista
- How to customize send to menu.
- How to change Folder background in windows 7