As the title says, what exactly is the difference between
public static String myString = \"Hello World!\";
and
public stat
Generally a static variable's value is shared between all instances (or the non-instance) of the Class it is defined in where a static block is a section of code that gets executed when Class is first loaded. Functionally There is no difference.