users! I have a problem with my Microsoft VS Code. When i run my code with method
System.in.read()
i have a problem "Evaluation failed because the thread is not suspended."
P.S. When i run file using javac and java this code is work.
i also have problem with VS Code another problem
My code
import java.io.IOException;
public class example {
public static void main(String args[])
throws IOException {
char symbol;
int count = 0, count_space = 0;
do {
symbol = (char) System.in.read();
if (symbol == ' ') {
count_space += 1;
}
count += 1;
} while(symbol != '.');
System.out.println("Всего символов: " + count);
System.out.println("Из них пробелов: " + count_space);
}
}
Sorry for bad grammar. Can you help me?