java 数据处理

List 转 String

List list = new ArrayList<>();
System.out.println(StringUtils.join(",",list1));
System.out.println(String.join(",", list1));

String 转 List

String ss = "java,php,C++";
List listString = Arrays.asList(ss.split(","));
for (String string : listString) {
    System.out.println(string);
}

Array 转 String

String[] ids = new String[]{};
Arrays.toString(ids)

截取字符串

value.substring(0,10);

Math

// 将角度转换为弧度
public static double toRadians(double angdeg) {
    return angdeg / 180.0 * PI;
}

public static double sin(double a) {
    return StrictMath.sin(a);
}

public static double cos(double a) {
    return StrictMath.cos(a);
}

Map

// Map.merge()
default V merge(K key, V value, BiFunction remappingFunction) {}

 

你可能感兴趣的:(java)