I solved this problem.
My Java version was the 1.6 and I found that was using 1.7 with CDI however after that I changed the Java version to 1.7 and import the package javax.faces.bean.ManagedBean and everything worked.
RIght Click on Project >> Properties>> Java Compiler >> Make Sure the Java version installed in class path is same as the java compiler. Thanks @PM77-1