question archive Write an expression that continues to bid until the user enters 'n'
Subject:Computer SciencePrice:2.85 Bought3
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/n) "): keepGoing = scnr.next().charAt(): } System.out.println(''"): Failed to compile AutoBidder.java: 13: char cannot be dereferenced while (keepGoing.equals('n')) { l error
Purchased 3 times