比如:int[] arr={0,1,0,2,0,5},怎样实现在输出的时候不显示0,输出结果为1,2,5
for(int i: arr){ if(i==0){ continue; }else{ System.out.println(i); } }
集结各类场景实战经验,助你开发运维畅行无忧