I'm using java8. I made the code below from the sample. I want to refactoring this, but I don't know how. Let me know if you have any good ideas.
Add Description : There was some error in coding, so I corrected it.
String returnStr = "";
if(a != "" && b != "" && c != ""){
returnStr = "1";
}else{
if(a != "" && b != ""){
returnStr = "2";
}else if(a != "" && c != ""){
returnStr = "3";
}else if(b != "" && c != ""){
returnStr = "4";
}else{
if(a != ""){
returnStr = "5";
}else if(b != ""){
returnStr = "6";
}else if(c != ""){
returnStr = "7";
}else{
returnStr = "8";
}
}
}
return returnStr;