When are string literals allocated and put into the string pool? Specifically, if a string literal is never reachable by any code path, will it ever be allocated?
Imagine you have the following code fragment:
    if(logger.isLoggable(Level.FINEST)){
        logger.log(Level.FINEST, "literal");
    }
Will "literal" be ever allocated if FINEST is not and have never been a loggable level?
 
     
    