ATM problem

Getting compilation error “ class MAT is public, should be declared in a file named public class MAT ^ 1 error”… Compiled in a different version of compiler the code works fine (Javac 1.7.0_09 ). How can I overcome this Guys need your help

remove keyword “public” from the declaration of the class MAT.i had the same error in a different program.


I had tried the same problem but in my case it is giving a runtime error. Should i also post my code?

Thank you praneeth it worked