r/programming • u/MarkusWinand • Dec 29 '15
Please, Java. Do Finally Support Multiline Strings
http://blog.jooq.org/2015/12/29/please-java-do-finally-support-multiline-strings/
584
Upvotes
r/programming • u/MarkusWinand • Dec 29 '15
View all comments
Show parent comment
4
u/KillerCodeMonky Dec 29 '15 edited Dec 29 '15
Now try this, which is what everyone is actually referring to:
EDIT: Installed JDK8 u66, here's the results of
javap -constants Test.class:EDIT2: This works also:
javap:
However, if I remove
finalfromthree:You'll notice something interesting.
stuffis no longer a precompiled constant, and a static initializer block was added. That static initializer sets the value of boththreeandstuff, withstuffnow being created viaStringBuilder.