请问,在编写代码是出现以下问题,怎么解决??新手,求老手帮忙。
import javax.swing.JOptionPane;public class caiquan{
public static void main(String args[]){
String str=JOptionPane.showInputDialog("请输入一个1~3的正整数!1是剪刀,2是石头,3是布。");
int people=Integer.parseInt(str);
int computer=(int)(Math.random()*3)+1;
String marks="拳头";
String marks1="拳头";
switch(people){
case 1:
marks="剪刀";
break;
case 2:
marks="石头";
break;
case 3:
marks="布";
break;}
switch(computer){
case 1:
marks1="剪刀";
break;
case 2:
marks1="石头";
break;
case 3:
marks1="布";
break;}
if(people==computer){
System.out.println("平局你出的值是:"marks"电脑出的值是:"marks1);
}else if(people==1&&computer==2||people==2&&computer==3||people==3&&computer==1){
System.out.println("你输了你出的值是:"marks"电脑出的值是:"marks1);
}else{
System.out.println("你赢了,你出的值是:"marks"电脑出的值是"marks1);
}
}
}