为什么我的switch语句会报错啊?
为什么我的switch语句会报错啊?
switch(item.getItemId()){
case 1:
Toast.makeText(MainActivity.this, "点击复制", Toast.LENGTH_LONG).show();
break;
case 2:
Toast.makeText(MainActivity.this, "点击粘贴", Toast.LENGTH_LONG).show();
break;
case 3:
Toast.makeText(MainActivity.this, "点击剪切", Toast.LENGTH_LONG).show();
break;
case 4:
Toast.makeText(MainActivity.this, "点击呵呵", Toast.LENGTH_LONG).show();
break;
}
电脑让我直接删掉这段代码