Write a program in java to demonstrate reverse() and replace() method?

class StringReverseReplace

{

                public static void main(String arg[])

                {

                                StringBuffer s1=new StringBuffer("Vikrant ");

                                StringBuffer s2=s1.append("Kumar");

                                System.out.println(s1.reverse());

                                System.out.println(s1.replace(1,3,"IT"));

                }

}

reverse() and replace() method.PNG

, , , , , ,

2 thoughts on “Write a program in java to demonstrate reverse() and replace() method?

  1. Pingback: jordan 11
  2. Pingback: retro jordans

Leave a Reply