静态类中用于2(2)条件的一个方法



我试图避免语句到达FCut类两次。

if(qty<FCut.fc[0][16]&&mq!=FCut.fc[0][16]){
}

我找到了!

private void Spin(){
if(vl>0)SP.IN(prd,vl,vt,0,0,bahan,gr,bbs,bled,0,0,0);
else SP.IN(prd,hl,ht,0,0,bahan,gr,bbs,bled,0,0,0);
Qdot(FCut.fc[0][16]);//<== Only once ^^
}
void Qdot(int fc16){
String fc=Integer.toString(fc16);
if(qty<fc16&&mq!=fc16){
if(qin.getText().length()>0){qin.setText(null);qblk.setText(null);}
}else{//<==next todo
}
if(fc.length()>3){
switch(fc.length()){
case 4:fc=fc.charAt(0)+"."+fc.substring(1,3);break;
case 5:fc=fc.substring(0,2)+"."+fc.substring(2,4);break;
case 6:fc=fc.substring(0,3)+"."+fc.substring(3,5);break;
case 7:fc=fc.charAt(0)+"."+fc.substring(1,3)+"."+fc.substring(4,6);break;
default:fc=fc.substring(0,2)+"."+fc.substring(2,4)+"."+fc.substring(5,7);
}
}
mqt.setText((R.string.minq+fc));
Say();
}

最新更新