public String getType(Uri uri) {
switch (matcher.match(uri)) {
case WORDS:
return "vnd.android.cursor.dir/logan.dict";
case WORD:
return "vnd.android.cursor.item/logan.dict";
default:
throw new IllegalArgumentException("unknown uri"+uri);
}
}
以上代码的每个case语句块中为什么不能加break?
android java switch
------解决方案--------------------
都return了加break干吗