![JAR search and dependency download from the Maven repository](/logo.png)
com.github.hackerwin7.jlib.utils.executors.ValueTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jlib-utils Show documentation
Show all versions of jlib-utils Show documentation
utils set for java projects
package com.github.hackerwin7.jlib.utils.executors;
import org.apache.commons.lang3.StringUtils;
/**
* Created by IntelliJ IDEA.
* User: hackerwin7
* Date: 2015/12/17
* Time: 4:58 PM
* Desc:
*/
public class ValueTest {
public static void main(String[] args) {
String ss = "3723,3723,3727,3731,3723,3735,3727,3723,3735,3731,3583,2009,2009,2009,2009,2009,2009,2009,1989,1989,1989,1989,1989,1989,1989,1997,1997,1997,1997,1997,1997,1997,2003,2003,2003,2003,2003,2003,2003,2003,2003,2003,2003,2003,2003,2003,3531,3452,3781,3769,3781,3781,3793,3781,3753,3793,3753,3781,3781,3753,3793,3769,3781,3781,3769,3769,3769,3793,3781,3793,3753,3781,3769,3753,3781,3793,3781,3753,3769,3753,3781,3793,3781,3473,3601,1942,1942,1942,1942,1942,1942,1942,1942,3539,3441,3583,3441,3505,3571,3621,3621,3621,3621,3621,3621,3599,3615,3599,3611,3611,3611,3603,3611,3599,3603,3603,3579,3615,3615,3603,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1981,1987,1987,1987,1987,1987,1987,1987,1987,1987,1987,1987,1987,1987,1987,2000,2000,2000,2000,2001,2002,2002,1989,1989,1989,1989,1989,1989,1989,1989,1989,1989,1989,1989,1989,1989,2002,2002,2002,2002,2002,2002,2002,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1983,1989,1989,1989,1989,1989,1989,1989,3507,3434,3551,3775,3749,3749,3737,3737,3737,3749,3737,3737,3749,3749,3749,3749,3737,3749,3775,3749,3749,3775,3749,3737,3737,3749,3749,3749,3737,3749,3749,3775,3737,3749,3737,3749,3737,3737,3749,3749,3775,3737,3775,3737,3737,3737,3749,3737,3749,3749,3737,3737,3737,3749,3775,3749,3737,3737,3775,3749,3737,3737,3775,3749,3737,3737,3749,3749,3775,3775,3749,3737,3737,3737,3737,3775,3775,3737,3775,3749,3749,3749,3749,3737,3737,3737,3737,3737,3737,3737,3737,3737,3749,3737,3667,3667,3667,3668,3669,3669,3669,3669,3669,";
String[] ssArr = StringUtils.split(ss, ",");
long le = 1000000;
long sum = 0;
int i = 0;
for(String value : ssArr) {
i++;
long length = Long.valueOf(value);
sum += length;
if(sum > le) {
sum = 0;
}
System.out.println(i + ", " + value + ", " + sum);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy