Posted by Mike on Sunday, March 2, 2008 at 2:20am.
I am trying to run the following program and am getting this error:
public class Pre2
static Scanner console = new Scanner(System.in);
public static void main(String args)throws IOException
Scanner inFile = new Scanner(new FileReader("Pre2Input.txt"));
PrintWriter outFile = new
int num1, num2;
num1 = inFile.nextInt();
num2 = inFile.nextInt();
outFile.println("Sum = " + (num1 + num2));
What am I doing wrong? Pls help. Thanks in advanced :)
Answer This Question
More Related Questions
- Java programming - Okay so I am rewrite the program and it's still not coming ...
- Computer Science-Java - Hi, I am writing an application class for a Lunar ...
- Computer Science Principles - I need to know what's wrong with my code and it's ...
- Java programming - can you show me where is the wrong for this program..because ...
- Computer Science Computer Programming - Please help! I cannot figure out what I ...
- Java programming- simulation of rolling dice - This is what i have so far. I'm ...
- Computer Sciene-java - Write a loop that will continuously prompt the user for ...
- programming - Can anyone help me with this really confusing programming problem...
- Computers - //program that puts two lists in order in one single list with all ...
- Computer Science - //program that puts two lists in order in one single list ...