标题: java基础 [打印本页] 作者: lpingping 时间: 2018-6-16 20:32 标题: java基础 public class Lianxi {
public static void main(String[] args) {
String rng ="ska36345asdkdfjaljksf";
char[] we = rng.toCharArray();
Arrays.sort(we);
for (int i = we.length-1; i >= 0; i--) {
System.out.println(we[i]);
}
}
}
public class Lianxi01 {
public static void main(String[] args) {
int num = 0;
double max = 5.9;
double min = -10.8;
for (double a = min; a < max; a++) {
double b = Math.abs(a);
if (b > 6.0 || b < 2.1) {
num++;
}
}
System.out.println("总共有"+ num);
}
}
public class Phone {
private String brand;
private String price;
static int size = 6;