how to take input from user without using scanner class