⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.java

📁 通讯采集软件
💻 JAVA
字号:
/*
 * test.java
 *
 * Created on 2005年12月30日, 下午5:55
 */

package collector.checkts;

import java.util.*;

/**
 *
 * @author  Administrator
 */
public class test {

  /** Creates a new instance of test */
  public test() {
  }

  public static void main(String[] args) {
    int count_of_ts = 8;
    System.out.println("count_of_ts = " + count_of_ts);
    Object termServerArray[] = new Object[count_of_ts];
    for (int i = 0; i < count_of_ts; i++) {
      termServerArray[i] = new Object();
    }

    int subTsCount;
    int k;
    k = count_of_ts / 10;
    if (count_of_ts % 10 == 0) {
      subTsCount = count_of_ts / 10;
    }
    else {
      if (count_of_ts >= (k + 1) * 9) {
        subTsCount = count_of_ts / 10 + 1;
      }
      else {
        subTsCount = count_of_ts / 10;
      }
    }
    for (int i = 0; i < 10; i++) {
      ArrayList m_tslist = new ArrayList();
      if (i < 9) {
        for (int j = 0; j < subTsCount; j++) {
          m_tslist.add(termServerArray[subTsCount * i + j]);
        }
      }
      else {
        int leftcount = count_of_ts - subTsCount * 9;
        for (int j = 0; j < leftcount; j++) {
          m_tslist.add(termServerArray[subTsCount * i + j]);
        }
      }
      System.out.println("i = " + i);
      System.out.println("m_tslist.size = " + m_tslist.size());

    }

  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -