I have this code currently:
input = new Scanner(new File("src/data/McDonalds Regular.csv"));
input.useDelimiter(",|\\n|$");
String tempChoice = input.next();
double price = input.nextDouble();
System.out.println(price + tempChoice);
with the input file being:
Double Cheeseburger,$1.59,Beef,
My expected output is 1.59Double Cheesburger
instead I get a type mismatch error because when I do input.next() instead of input.nextDouble() it appears its scanning the token as $1.59
, instead of just 1.59
like it should.