Actually its really simple.
Everytime when an object of class is created i.e class is instantiated, runtime system creates a copy of all variables and methods of class for that object/instance which are called as Instance Members. Now our object will only use these copy members. To access these members we use obejctname.member.
In contrast, there is something called as Class Members. Class members are defined using static keyword. This means that class will create only single copy of these members, irrespective of how many instances are created. To access these members we use classname.staticmember.
Taking a simple example:
We have class named Person. It has instance variables like name,age and instance methods like run(), sleep(). Class contains one static method salary().
public class Person {
//Instance Members
private String name;
private int age;
public void run() {
}
public void sleep() {
}
//Class Member
public static void salary() {
}
public static void main(String[] args) throws IOException {
Person person1 = new Person();
Person person2 = new Person();
//accessing instance members
String person1NameInMain = person1.name;
int person1AgeInMain = person1.age;
person1.run();
person2.sleep();
Person.salary(); // accessing static member
}
}
That's all. I hope this helped.