Here is my code:
import static java.lang.System.out;
import java.util.Scanner;
public class Speech {
public static void main(String[] args) {
char[] alphabet = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p',
'q','r','s','t','u','v','w','u','x','y','z'};
Scanner myScanner = new Scanner(System.in);
out.print("Please type what you would like translated: ");
for(int i = 0; i<(alphabet.length/2); i++)
{
char temp = alphabet[i];
alphabet[i] = alphabet[alphabet.length - i - 1];
alphabet[alphabet.length - i - 1] = temp;
}
String inputphrase = myScanner.next();;
}
}

New Topic/Question
Reply




MultiQuote







|