赞
踩
- private static int get_wx_inx(String str) {
- boolean equalsIgnoreCase = str.equalsIgnoreCase("0");
- int equalsIgnoreCase2 = str.equalsIgnoreCase("1");
- if (str.equalsIgnoreCase("2")) {
- equalsIgnoreCase2 = true;
- }
- if (str.equalsIgnoreCase("3")) {
- equalsIgnoreCase2 = 3;
- }
- return str.equalsIgnoreCase("4") ? 4 : equalsIgnoreCase2;
- }
JDK版本问题,如果仍要使用该版本,则更正为:
- private static int get_wx_inx(String str) {
- if(str.equalsIgnoreCase("0")) {
- return 0;
- } else if(str.equalsIgnoreCase("1")) {
- return 1;
- }else if(str.equalsIgnoreCase("2")) {
- return 2;
- } else if(str.equalsIgnoreCase("3")) {
- return 3;
- } else if(str.equalsIgnoreCase("4")) {
- return 4;
- } else {
- return 0;// write default return here. If every condition goes false then this default will be return.
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。