Could you please tell me why my task fails passing? Code seems to be working fine but one of the requirements don't pass.
package pl.codegym.task.task14.task1408;
/*
Ferma drobiu
*/
public class Solution {
public static void main(String[] args) {
Hen hen = HenFactory.getHen(Continent.AFRICA);
hen.getMonthlyEggCount();
//System.out.println(hen.getDescription());
}
static class HenFactory implements Continent {
static Hen getHen(String continent) {
Hen hen = null;
if (continent == "Ameryka Północna" )
hen = new NorthAmericanHen();
else if (continent == "Afryka")
hen = new AfricanHen();
else if (continent == "Europa")
hen = new EuropeanHen();
else if (continent == "Azja")
hen = new AsianHen();
return hen;
}
}
}