View Single Post
  #5 (permalink)  
Old 07-17-2007, 12:38 AM
JavaBean's Avatar
JavaBean JavaBean is offline
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
You can try:

Code:
String reply = myScanner.nextLine(); if (reply.charAt(0) == 'Y') hasCoupon = true; else hasCoupon = false;
instead of:

Code:
reply = myScanner.findInLine(".").charAt(0); hasCoupon = reply == 'Y' || reply == 'y'; hasNoCoupon = reply == 'N' || reply == 'n';
Reply With Quote