import java.util.Scanner; 
public class JavaApplication83 { 
 
 
 public static void main(String[] args) { 
 Scanner scan = new Scanner(System.in); 
 System.out.println("Enter Strings: "); 
 String word1 = scan.nextLine(); 
 String word2 = scan.nextLine(); 
 String newWord = ""; 
 if (word1.length() == word2.length()){ 
 for (int i = 0; i < word1.length(); i++) 
 { 
 newWord += word1.charAt(i) +""+word2.charAt(i); 
 } 
 
 } 
 else{ 
 newWord = "error"; 
 } 
 System.out.println(newWord); 
 } 
 
}
I hope this helps!