Код: Выделить всё
if(name.contains(substring)){
if(name.contains(substring1)){
return "this";
}else if(name.contains(substring2)){
return "that";
}
...
}else if(){
// if else ladder
}
....//else if ladder continues
else{
return "them"
}
Подробнее здесь: https://stackoverflow.com/questions/587 ... lse-branch
Мобильная версия