I need to change the following if\'s to a switch-case while checking for a String, to improve the cyclomatic complexity.<
if
switch
case
String
Java 8 supports string switchcase.
String type = "apple"; switch(type){ case "apple": //statements break; default: //statements break; }