I have just tried to run a program in the command line. Here is the code:

import javax.swing.*;
class myFirstProgram
public static void main(String[] arg)
JOptionPane.showMessageDialog(null, "It works!");

When I typed in javac MyFirstProgram.java, there was a short pause.

Then I typed in java MyFirstProgram and I got an error that said something about "wrong name: myFirstProgram". So at the command line I typed java myFirstProgram and the program ran. So my java file is called MyFirstProgram.java and my class file is called myFirstProgram.class. Why did it change the filename from "My" to "my"?