Click here to Skip to main content
16,017,986 members

Comments by nitinjain9619 (Top 9 by date)

nitinjain9619 18-Jul-20 6:01am View    
I am very touched by what you have done for me and thank you so much once again
nitinjain9619 18-Jul-20 5:31am View    
yes,i applied it and it is working fine now but now i want that scanner object should not store any thing after enter key pressed it should store only first number and stop reading after that. Is it possible?
nitinjain9619 18-Jul-20 5:10am View    
actually i want that if user enter for first than it should be allowed, after that scanner object should not store anything (after enter key pressed).
i am working on a project bingo game where each player will get chance circularly,my code is working perfect if user enter one number at a time but whenever he enter two number simultaneously then at next chance whatever he written 2nd time in his previous chance is considering his played number in current chance i want to stop user for entering two number simultaneously.

and thanks for your support..
nitinjain9619 18-Jul-20 4:54am View    
Deleted
actually i want that if user enter for first than it should be allowed, after that scanner object should not store anything (after enter key pressed).
i am working on a project bingo game where each player will get chance circularly,my code is working perfect if user enter one number at a time but whenever he enter two number simultaneously then at next chance whatever he written 2nd time in his previous chance is considering his played number in current chance i want to stop user for entering two number simultaneously.

and thanks for your support..
nitinjain9619 18-Jul-20 4:43am View    
i was trying wrong i created variable int flag=1 and then before reading user input i was checking flag is 1 if yes then allow to write using sc.nextInt(); and after that flag=0;