(vii)
What is the relevance of the keyword static for a data member of a class.
Solution
When a data member is declared static it can be accessed without creating the object of the class.
For example :
class Demo
{
// static method
static void m1()
{
System.out.println("from m1");
}
public static void main(String[] args)
{
// calling m1 without creating
// any object of class Demo
m1();
}
}