I got the error like NoClassDefFoundError Formdata1(my file name) as the wrong name
This means you have saved the file with different name and compile it with another name. If you have done this, then this error will definitely occur.
Anyways, simply save your file with FormData.java and make changes in your code also if you have defined another name for class. Then compile it with the command javac FormData.java.