maibin 7f4c7157eb Struts2 refactoring (#1176)
* Modifications to model on Hibernate One to manyTutorial

* Modifications to model on Hibernate One to manyTutorial

* Modifications to model on Hibernate One to manyTutorial

* Simple Genetic Algorithm improvements

* Struts2 refactoring
2017-02-14 17:49:10 +01:00

19 lines
461 B
Java

package com.baeldung.struts;
public class CarMessageService {
public String getMessage(String carName) {
System.out.println("inside getMessage()" + carName);
if (carName.equalsIgnoreCase("ferrari")){
return "Ferrari Fan!";
}
else if (carName.equalsIgnoreCase("bmw")){
return "BMW Fan!";
}
else{
return "please choose ferrari Or bmw";
}
}
}