Write a program that reads characters from the keyboard until a period is received. Have the program count the number of spaces and display it to the user. After that, ask the user if he/she would like to count a specific character. Terminate when the user is done counting the characters. plzzz help me
what help do you need? you know what to do, the only thing you need to actually create and test that application is a keyboard, and since you've been able to write that post, I 'm pretty sure you already have one.
show us the code you've written and where you 're stuck, but we're not going to write code-on-demand.
public class Characters
public static void main(String args)
Scanner input = new Scanner(System.in);
int spaces = 0;
System.out.println("Enter . to stop.");
while(ch != '.')
ch = (char) System.in.read();
System.out.println("number of spaces : "+spaces);
System.out.println("would like to count a specific character(yes or no) : ");