Wednesday, December 25, 2019

Source code for Java Program Replace a String?


Source code for Java Program Replace a String

import java.*;

public class Replace
{
    public static void main(String[] args)
    {
        StringBuffer a=new StringBuffer("C++ programming is fun");
        System.out.println(a.replace(0,3,"Java"));
       
       
    }
}

No comments:

Post a Comment