[Solved] String class replace() method [closed]
How many objects are created ? // “xyz” is interned , JVM will create this object and keep it in String pool String x = “xyz”; // a new String object is created here , x still refers to “xyz” x.toUpperCase(); // since char literal `Y` is not present in String referenced by x , … Read more