Doesn't java have string.split? This might not compile but a general flow and alternative to hardcoded substring ops.:
Code:
String inDate, outDate;
String[] dateSplit; // holds split string
inDate = keyboard.nextString();
dateSplit = inDate.split("/"); // splits the string on "/" character
outDate = dateSplit[1] + "-" + dateSplit[0] + "-" + dateSplit[2];
System.out.println(outDate);
Split divides a string up into segments based on the character you "split" on and puts them into an array, so if you pass it
"09/11/2001" and split on "/" you get an array with elements
[09,11,2001]
So when I say dateSplit=inDate.split("/")
dateSplit[0]="09", dateSplit[1]="11", and dateSplit[2]="2001"
Now you can just recombine the separate strings as shown and you get
11-09-2001