Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Objects;
- import java.util.Scanner;
- public class Test {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- String str1 =scan.nextLine();
- String str2 = scan.nextLine();
- String m_str = " ";
- for(int i=0;i<str1.length();i++){
- String f_str =str1.substring(i);
- m_str =str2.substring(0,i) + f_str;
- if (!str1.equals(str2)){
- System.out.println(m_str);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement