逗号是常用于多个参数与参数间的区分,如:int fun(String s, int t){...}
冒号用在语句中表示后面要进行选择,如:
int i = (3>5)?3:5;
switch(x)//byte short int char
{
default:
System.out.println("d");
//break;
case 4:
System.out.println("a");
//break;
case 6:
System.out.println("b");
break;
case 2:
System.out.println("c");
break;