
Post


@EclipseJavaIDE true. Literal strings are always interned and placed in the String pool.
English

@EclipseJavaIDE True, no use of new String, so "Hello" will be placed once into String Pool, both references refer to same object "Hello"
English

@EclipseJavaIDE False, because the equalty here looking in the reference addresses in the memory not to the content 😉
English

@EclipseJavaIDE @progratres False. Wrong use of compare strings. This error is very common
English

@EclipseJavaIDE True because the strings share the same memory adress. So even though you dont use „equals“ it will result in true
English

@EclipseJavaIDE answer is false
because it refers storage location,there is no two objects share same memory
English

@EclipseJavaIDE True. The first one checks the string pool for a match, creates and interns the string if it doesn't find one. The second finds the first one and assigns it, so the references point to the same literal.
English

@EclipseJavaIDE True, they both point to the same object in the string pool.
English

@EclipseJavaIDE True, Java use string pool for this type of string so the two string varaibles refer to same memory location
English

@EclipseJavaIDE true. Java keeps String Objekts declared as literal in an internal String cache using method String.intern(). Thus the objects are identical.
English

@EclipseJavaIDE in this code using “==" and not "equals" is always true ;-)
English

@EclipseJavaIDE It’s false. You’re checking the reference address, not the contents, since strings are objects. To check string contents you need to use str.eauals(“”);
English

@EclipseJavaIDE It's true because java internalizes strings by default. Or does it?
DUN DUN DUUUUUUUN
English





















