能够写出这样的代码, 其实体现了水平
switch (state) {
case 0:
break;
case 3:
return; // already connected
case 4:
state = 0;
throw new TransportException( "Connection in error", te );
default:
TransportException te = new TransportException( "Invalid state: " + state );
state = 0;
throw te;
}
原文:http://www.cnblogs.com/FlyAway2013/p/4073108.html