Been awhile since I've looked at the decompiled code, but just glancing at the results, I don't see any significant difference:
class TestMe {
private final String RETRIEVE_SQL = "select column1, column2 "
+ "from table "
+ "where AnyCommonWhereCondition ";
private static final String STATIC_SQL = "select column1, column2 "
+ "from table "
+ "where AnyCommonWhereCondition ";
public static void main(String argv[]) {
TestMe me = new TestMe();
}
TestMe() {
String s;
s = RETRIEVE_SQL;
s = STATIC_SQL;
}
}
.source TestMe.java
.class TestMe
.super java/lang/Object
.field private final RETRIEVE_SQL Ljava/lang/String;
= "select column1, column2 from table where AnyCommonWhereCondition "
.field private static final STATIC_SQL Ljava/lang/String;
= "select column1, column2 from table where AnyCommonWhereCondition "
.method public static main([Ljava/lang/String;)V
.limit stack 2
.limit locals 2
.line 11
new TestMe
dup
invokespecial TestMe/<init>()V
astore_1
.line 12
return
.end method
.method <init>()V
.limit stack 2
.limit locals 2
.line 14
aload_0
invokespecial java/lang/Object/<init>()V
.line 2
aload_0
ldc "select column1, column2 from table where AnyCommonWhereCondition "
putfield TestMe/RETRIEVE_SQL Ljava/lang/String;
.line 17
ldc "select column1, column2 from table where AnyCommonWhereCondition "
astore_1
.line 18
ldc "select column1, column2 from table where AnyCommonWhereCondition "
astore_1
.line 19
return
.end method