import java.io.*;
class hapuskarakter{
public static void main(String[] args)throws IOException{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String a,b;
try{
System.out.print("Masukkan kata = ");
a=br.readLine();
System.out.print("Karakter yang ingin dihapus : ");
b=br.readLine();
System.out.print("Kalimat : "+a.replace(b,""));
}catch(NumberFormatException nfe){
System.exit(0);
}
}
}
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar