package exampleColl; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import testMysql.MysqlConnect; import java.util.Collections; import java.util.LinkedList; import static TestExp.TestUnicode.replaceParam; import static testMysql.MysqlConnect.createCon; import static testMysql.MysqlConnect.hasResult; public class NumParam { static String total=""; static int xH=0; public static Logger log= LogManager.getLogger(NumParam.class); public void mainSZ(String... param){ for (int i = 0; i <= param.length-1; i++) { log.info(param.length+",当前长度"+i); total += param[i]; } log.info("mainSZ-完整内容:"+total); } public static void mainLB(String[] myList) { for (int i = 0; i <= myList.length-1; i++) { //log.info(myList.length+",当前长度"+i); total += myList[i]; } log.info("mainLB-完整内容:"+total); } public static void main(String[] args) { NumParam numParam=new NumParam(); String p0="小"; String p1="仔"; String p2="你"; String p3="还"; String p4="敢"; String p5="跑"; String p6="别"; String p4p1="。"; LinkedList<String> strHH=new LinkedList<>(); Collections.addAll(strHH, null,"小","","","凤","像","敢","飞","别","跑","爱","","你","若","来","","云","台","襄","天","好",null,""); for(xH=0;xH<strHH.size();xH++){strHH.remove("");strHH.remove(null);} for(xH=0;xH<strHH.size();xH++){if (strHH.size()==18){strHH.removeLast();strHH.removeFirst();}} log.info(strHH.size()+",内容:"+strHH); if (strHH.size()==17){total="";for(xH=0;xH<strHH.size();xH++){total+=strHH.get(xH);}} else if (strHH.size()==18){total="";for(xH=0;xH<strHH.size();xH++){total+=strHH.get(xH);}} else if (strHH.size()==19){total="";for(xH=0;xH<strHH.size();xH++){total+=strHH.get(xH);}} else if (strHH.size()==16){total="";for(xH=0;xH<strHH.size();xH++){total+=strHH.get(xH);}} else if (strHH.size()==15){total="";for(xH=0;xH<strHH.size();xH++){total+=strHH.get(xH);}} log.info("准备第二次拼装:"+total); numParam.mainSZ("-----",total); total=""; mainLB(new String[]{p0,p3,p2,p4,p4p1,p5}); total=""; numParam.mainSZ(p0,p1,p2,p3,p4,p4p1,p6,p5); } }
文章来源地址https://www.toymoban.com/news/detail-463033.html
文章来源:https://www.toymoban.com/news/detail-463033.html
到了这里,关于列表进行处理,组成句子的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!