Please Help i get a error every time with my Programm [Runtime Error "Java"] : Hi Here is the Error **["Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 2
	at java.lang.String.charAt(Unknown Source)
	at Haupt.main(Haupt.java:21)"]**


And here is my Code Why did i get this Errors?



---------------------------------------------------
import java.util.Scanner;

public class Haupt {

	public static void main(String[] args) {
		String Wort="";
		String WortCpy="";
		String WortRev="";
		int i=0;
		Scanner scan = new Scanner(System.in);
		
		
		System.out.print("Geben Sie ein Wort ein : "); //Ausgabe
		Wort = scan.nextLine(); //Eingabe
		scan.close();
		for(i=0;i < Wort.length();i++) { 
			WortCpy= WortCpy +  Wort.charAt(i); //Speichert jeden Buchstaben einzeln in Wortcpy ab
		}
		for(i=Wort.length();i>=0;i--) {
			WortRev = WortRev +  Wort.charAt(i); 
		}
		
		System.out.println("Wort : " + Wort);
		System.out.println("Wort Kopiert : " + WortCpy);
		System.out.println("Wort umgedreht : " + WortRev);
		
		
	}

}

