All objects are created a runtime. The compiler emits code. The code must be loaded into a JVM and executed before any objects are created. No objects are created at compile time -- although the compiler might put code into a class file which results in an object being created more or less automatically.
A String literal "like this" is actually a String object. You don't have to create it explicitly with "new" -- it is created internally by the JVM when the code that first mentions it is executed, based on data in the class file, put there by the compiler. But it is still created while the program is running, as all objects must be.
If you explicitly create a String like this:
then the "new String" part results in a copy being made of the existing object. If you see this in code, the virtually 100% of the time it is for one of two reasons:
1) The programmer is new to Java and doesn't know what they're doing