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
- Computer Science-Java - Hi, I am writing an application class for a Lunar ...
- Computer Science Computer Programming - Please help! I cannot figure out what I ...
- Java programming - can you show me where is the wrong for this program..because ...
- Java programming- simulation of rolling dice - This is what i have so far. I'm ...
- Java Panel Problem - I am supose to draw a grid and center it with a 10 pix ...
- Computer Sciene-java - Write a loop that will continuously prompt the user for ...
- 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 ...
- Computer Programming - How do I make a util class with a method name that is add...
- Java - I am supposed to convert a program i already made into a Java console ...