标签:boolean color exception src try 图片 isl continue catch
思想:基本程序设计
public boolean isLongPressedName(String name, String typed) { if(name.equals(typed)) return true; for (int i = 0, j = 0; i < name.length();) { try { if (name.charAt(i) == typed.charAt(j)) { j++; i++; continue; } else if (name.charAt(i - 1) == typed.charAt(j)) { j++; continue; } else { return false; } } catch (Exception e) { return false; } } return true; }
标签:boolean color exception src try 图片 isl continue catch
原文地址:https://www.cnblogs.com/godoforange/p/10865444.html