When is the text “Hi there”displayed? public class StaticTest{? ? static? ? {? ? ? ? System.out.println(“Hi there”);? ? }? ? public void print()? ? {? ? ? ? System.out.println(“Hello”);? ? }? ? public static void main(String args[])? ? {? ? ? ? StaticTest st1 = new StaticTest();? ? ? ? st1.print();? ? ? ? StaticTest st2 = new StaticTest();? ? ? ? st2.print();? ? }}
A.Never.
B.Each time a new object of type StaticTest is created.
C.Once when the class is loaded into the Java virtual machine.
D.Only when the main() method is executed.