标签:
String input=......; switch (input.toLowerCase()) { case "yes" : ...... break; case "no"; ...... break; ...... }
enum Size {SMALL, LARGE}; Size size=......; switch (size){ case SMALL://不需要使用Size.SMALL ...... break; ...... }
标签:
原文地址:http://www.cnblogs.com/Russel/p/5944504.html