Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MutantStrings {
- 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(1);
- m_str =str2.substring(0,1) + f_str;
- if (!str1.equals(str2)){
- System.out.println(m_str);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement