title: why memory space for String object and literals are separated in JVM?
body: <p>In Java, every objects get garbage collected when its in dead state, so why String object and literals are placed in different memory space..</p>