solve this java program.
Attachments:
Answers
Answered by
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
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
Math,
6 months ago
Math,
6 months ago
English,
1 year ago
Business Studies,
1 year ago
Business Studies,
1 year ago