I'm not really sure how I would approach counting the occurrences of each letter. Could someone point me to the right direction in doing this, thank you :)
if(icanreadstrings.equals ("start")){
String strten = Console.readLine("Enter 10 letters (no spaces,commas between each letter and no numbers): "); // Asks the user to enter 10 letters which is then saved as a string "strten".
Console.println(strten);// Prints out whatever the user entered.
if(strten.matches("[a-zA-Z]+") && strten.length() == 10){ // if whatever the user enters is letters (not numbers) and if it matches to the length, which is 10.
Console.println("There are " + strten.length() + " letters that you've wrote."); // lets the user continue if they've wrote 10 letters, yes 10!
}else{
Console.println("There are more than or less than 10 letters that you've wrote or you have numbers in your list of letters. Please rewrite 10 different LETTERS for this program to continue."); // Checks to see if you wrote more than 10 letters if you did then it prompts a message and the user can't continue until he writes 10 letters.
}
}