How can I run my code during waiting user input in JAVA

I am making a game in JAVA console. I want to show elapsed time ,waiting input from user.But I can’t run any code waiting input. How can ı run my codes during input wait? >Solution : You can create new Thread, define what it should do and start it. Docs: https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html Check docs for java… Read More How can I run my code during waiting user input in JAVA