Re: String question
- From: "Mike Schilling" <mscottschilling@xxxxxxxxxxx>
- Date: Thu, 24 Jul 2008 23:55:21 -0700
Lew wrote:
Lasse Reichstein Nielsen wrote:
(In this particular case it'll probably just concatenate the two
literal strings at compile time, though).
It has to, by JLS 15.28, "Constant Expression".
<http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#5313>.
It could generate
String s = "Hello" + :"World";
as
String s = ("Hello".concat("World")).intern();
That would be really silly, but not so far as I can see illegal.
.
- Follow-Ups:
- Re: String question
- From: Lew
- Re: String question
- References:
- String question
- From: stef
- Re: String question
- From: Lasse Reichstein Nielsen
- Re: String question
- From: Arne Vajhøj
- Re: String question
- From: Lew
- String question
- Prev by Date: Re: String question
- Next by Date: JTable + Excel
- Previous by thread: Re: String question
- Next by thread: Re: String question
- Index(es):
Relevant Pages
|