Ryan Rampersad
Opinions, Thoughts and Ideas - PHP, Java and Javascript
  • Home
  • About
  • Contact
Browse: Home / nextInt

nextInt

Stop Input Skipping in Java

By Ryan on December 19, 2008

In Java, there is a particular case where using Scanner can cause a request for input to be totally ignored. I’ve called it the int-skip-string case. Basically, you enter an int using Scanner.nextInt() and proceed to enter a string but just as you’re about to type it, you notice that your chance is gone! And [...]

Posted in Error, Java | Tagged int, Java, newline, nextInt, nextLine, scanner, skip, stop, string | 12 Responses

Recent Posts

  • Update Ubuntu via Terminal
  • How to install libmysqlclient15off on Ubuntu 10.04
  • The Great iPhone Price
  • My Top 5 AP Computer Science Tips
  • Ubuntu Username/Password On Live CD

Tags

(fluff)Grabber ap Apple array beta blog blogs Browser Browsers CakePHP chrome CSS Design Error exam facebook Firefox fluff friends fluff grabber free Google html ib iGoogle internet explorer Java Javascript linux Microsoft model Mootools music PHP plurk review School SEO solution string Tips ubuntu update Windows windows 7 Wordpress

Search

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
QC: