I am using Eclipse and have not used Java for sometime. However, I can compile my code on the command-line just fine and generate the necessary .class files. In
This problem got resolved by mentioning the package name
I moved my file Test_Steps.java which was under package stepDefinition
by just adding the package stepDefinition the problem got resolved
So this problem can occur when you have a package and you are not using in your class file.
Adding it has resolved the problem and the error was no longer appearing.