Look at your definition, it needs a return type on the method declaration. And the return statement tells you what type it is actually returning.
public static getApiInterface();
{
if (retrofit==null)
{
retrofit= new Retrofit.Builder().baseUrl(ApiInterface.BASE_URL).
addConverterFactory(GsonConverterFactory.create()).build();
}
return retrofit.create(ApiInterface.class);
}