
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

public class String ReplaceFirst { public static void main(String[] args) { String str = "Her name is Tamana and Tamana is a good girl." ; String strreplace = "Sonia"; String result = str.replaceFirst("Tamana", strrepla); System.out.println(result); } }