Netbeans type incompatibility issue

I am getting the following warning in Netbeans:

incompatible types
found : carPackage.port.search
required : carPackage.SearchResponse 

      

In my JSP page, I have the following code:

CarService service = new CarService();
CarPort port = service.getCarPort();
SearchResponse searchResult = port.search("Toyota");

      

The error obviously happens on this line:

SearchResponse searchResult = port.search("Toyota");

      

What data type should I insert instead of SearchResponse?

Thanks Lucas

+1


a source to share


1 answer


You are missing; from the end. If CarPort.search returns SearchResponse then your datatypes are correct.



0


a source







All Articles