import java.io.*;
class ReplaceString
{
public static void main(String args[])
{
String s1="0",s2;
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter the alphabets of string");
try
{
s1=bf.readLine();
}
catch(Exception e)
{
e.printStackTrace();
}
s2=s1.replace('a','e');
System.out.println("after replacing a with e,the string is:"+s2);
}
}
class ReplaceString
{
public static void main(String args[])
{
String s1="0",s2;
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter the alphabets of string");
try
{
s1=bf.readLine();
}
catch(Exception e)
{
e.printStackTrace();
}
s2=s1.replace('a','e');
System.out.println("after replacing a with e,the string is:"+s2);
}
}
Comments
Post a Comment