I suggest it's beneficial for you if you read about scanner class and choose the right method according to your need and file structure.
you can take a look at scanner class and it's methods Here....
Type: Posts; User: aprabhat
I suggest it's beneficial for you if you read about scanner class and choose the right method according to your need and file structure.
you can take a look at scanner class and it's methods Here....
Is this your input file
is yes then the problem with your code is
[code=java]
demandRate = inputStream.nextInt();
[code]
you try to read a line which is "demand rate: 50" using nextInt()...
Paste the full error message that you get and your code has compilation errors like
fileName = console.next();
console is instance of which class? is an instance of Scanner.