I have some doubts about usage of static method in Java. I read many places static variables are instance independent so be comes global.
public class ThirdC
The value is initialized when the class is loaded. Therefore each time you execute the code, it is initialized to the value "Java" as is defined in the class. The new value is not saved, it is only changed in memory and is "reset" when the code is executed again.
The term global has nothing to do with the variables persistence, and scope is defined only within the running program.