I just installed java and am trying to compile sample code. I copied a Fibonacci sequence program into Notepad, saved it as "Fibonacci.java" and compiled it in Windows command prompt as such:
javac Fibonacci.java
The output: MyFirstApp.class
MyFirstApp is the name for another thing I'm working on in Eclipse. What's going on?
THanks for help.
Code:
public class Fibonacci {
public static void main(String[] args) {
int N = Integer.parseInt(args[0]);
int f = 0, g = 1;
for (int i = 1; i <= N; i++) {
f = f + g;
g = f - g;
System.out.println(f);
}
}
}