Computer Science, asked by dynamicsashish67, 1 year ago

solve this java program.​

Attachments:

Answers

Answered by zakirhussain786
0

Answer:

Source Code:

public class ICSE2006_6

{

public static void main()throws Exception

{

String s="January 26 is celebrated as the Republic Day of India";

s=s.replace("January", "August");

s=s.replace("26", "15");

s=s.replace("Republic", "Independence");

System.out.println(s);

}

}

Result:

OUTPUT:

August 15 is celebrated as the Independence Day of India

Answered by yashvisrp5425a
0

import java.util.*;

class replace

{public static void main()

   {

       Scanner sc=new Scanner (System.in);

       String s="26th jan is celebrrated as the republic day of india ";

       s=s.replace("26th","15th");

       s=s.replace("jan","august");

       s=s.replace("republic day","indiepence day");

       System.out.println(s);

   }

}

Similar questions