• Dear Guest, Please do NOT forget to join our JAVA JOBS (ONLY) FACEBOOK GROUP to be aware of latest JAVA openings, and you may also post any JAVA related queries/jobs.

How JVM creats String object

we create objects in fore ways...
1)By using new operator.
2)Factory methods.
4)cloning mechanism.
but when we write String s="shekar";
how the object is create...
is jvm use another way
When JVM find String object to be created as String s = "chetna", then it does not create this object in heap memory rather it puts this object into the String pool.String pool is managed by String class.