Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company.ExamM;
- import java.util.ArrayList;
- import java.util.LinkedHashMap;
- import java.util.Scanner;
- public class RealShit2 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- String key=sc.nextLine();
- String text=sc.nextLine();
- int index=text.indexOf(key);
- while(index!=-1){
- text=text.replace(key,"");
- index=text.indexOf(key);
- }
- System.out.print(text);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement