I'm a beginner in java and I have a question. Is calling a static method in class makes this class become instantiated? I mean , If I call a static method that exists in a class, will JVM create an instance of this class in memory ? If I have a class called X ,and a class called Y , the class Y contains a static method M that instantiates another class called Z that extends thread
public class X {
public static void main(String[] args) {
Y.M();
}
}
public class Y {
static void M() {
new Z().start();
}
}
class Z extends Thread {
public void run() {
ConnectToServer();
}
}
Now how many instances of Y I'm gonna have in memory?