when you say String s1="abc"; it will create one string object in the string pool and s1 reference varible will be refering that,where as String s3=new String("abcd"); creates one string poll object and one string object and reference varible s3 will be refering the object created in the pool so totally 4