日期:2014-05-19 浏览次数:20849 次
package com.tur.demo;
import java.util.LinkedList;
import java.util.List;
public class Hello {
public static void main(String[] args) throws InterruptedException {
String str = "1F5F : FF2D";
String[] ns = str.split("\\s*:\\s*");
int min = Integer.parseInt(ns[0], 16);
int max = Integer.parseInt(ns[1], 16);
List<String> hexes = new LinkedList<String>();
for (int i = min + 1; i < max; ++i) {
hexes.add(Integer.toString(i, 16).toUpperCase());
}
System.out.println(hexes);
}
}