package string2;

/*
 * Given a string, return a string where for every char in the original, 
 * there are two chars.
 * 
 * doubleChar("The") -> "TThhee"
 * doubleChar("AAbb") -> "AAAAbbbb"
 * doubleChar("Hi-There") -> "HHii--TThheerree"
 */

public class DoubleChar {
	
	public static void main(String[] args) {
		DoubleChar test = new DoubleChar();
		System.out.println(test.doubleChar("The"));
		System.out.println(test.doubleChar("AAbb"));
		System.out.println(test.doubleChar("Hi-There"));
	}
	
	public String doubleChar(String str) {
		  String result = "";
		  
		  for (int i = 0; i < str.length(); i++) {
		      result = result + str.charAt(i) + str.charAt(i);
		  }
		  return result;
	}

}
@@ -133,24 +133,25 @@
 Char(%22The%22) 
+-
 -%3E %22TThhee%22%0A
@@ -172,16 +172,17 @@
 %22AAbb%22) 
+-
 -%3E %22AAAA
@@ -213,16 +213,17 @@
 There%22) 
+-
 -%3E %22HHii
@@ -699,8 +699,9 @@
 t;%0A%09%7D%0A%0A%7D
+%0A

Update DoubleChar.java