It kinda depends on what you mean by special characters
Answer: Why'd you'd Microwave your phone?
Explanation: Ok first don't do that, it can make it explode, and since you did that, it messed up something, you'll have to get it fixed or buy a new one
Hope this helps^^
Answer:
Explanation:
The following code is written in Java. It asks the user for an input and saves it in a String variable. Then it loops through all the characters in the string and counts the spaces. Finally, it prints the total number of spaces in the String.
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter Line Now:");
String userInput = in.nextLine();
int spaceCount = 0;
for (int x = 0; x < userInput.length(); x++) {
if (userInput.charAt(x) == ' ') {
spaceCount++;
}
}
System.out.println(spaceCount);
}
Web browser (Google Chrome, Safari, Internet Explorer, Edge, etc. )