Question: Write an expression that continues to bid until the user enters 'n'. import java.util.Scanner: public class AutoBidder { public static void main (String args) {

Write an expression that continues to bid until the user enters 'n'. import java.util.Scanner: public class AutoBidder { public static void main (String args) { Scanner scnr = new Scanner(System.in): Random randGen = new Random(): char keepGoing = '- ': int nextBid =: randGen.setSeed(5): while (keepGoing.equals('n')) { nextBid = nextBid + (randGen.nextInt(1) + 1): System.out.println('I'll bid S" + nextBid +"!"): System.out.print("Continue bidding? (y) "): keepGoing = scnr.next().charAt(): } System.out.println(''"): Failed to compile AutoBidder.java: 13: char cannot be dereferenced while (keepGoing.equals('n')) { l error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
