Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package DPM;
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- String sub = scan.nextLine();
- String line = scan.nextLine();
- while (line.contains(sub)){
- line= line.replace(sub, "");
- }
- System.out.println(line);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement