Q:

Why I got " cannot be resolved to a type" error? 

I am developing a dynamic web project (RESTful jersey) under Eclipse IDE. 
Under src/my/demo/service folder I have CarService.java class
public class CarService {
  ...
}

Under src/my/demo/controller folder I have UserController.java class
import my.demo.service. CarService;

public class UserController{
    private CarService carService; //ERROR: CarServcie cannot be resolved to a type

}

I do have imported the CarService, why eclipse give me the error "CarServcie cannot be resolved to a type" in my UserController.java? 
--------Edit------------------
I found the cause: for some reason, my.demo.service has the same level as src/ in eclise project explorer view.  After I move my.demo.service under src/, it is fine.  Seems I should not create new package in "Project Explorer" view in Eclipse... 
But thank you for your response:)

A:

u just need go to Project ---> clean
See http://philip.yurchuk.com/2008/12/03/eclipse-cannot-be-resolved-to-a-type-error/

