【Android】一些好用的方法(持续更新)

2020-03-26  本文已影响0人  Blue_Well
public static final String TAG = "MainActivity";
Log.d(TAG, tempData);
HashSet<String> hash_mac = new HashSet<>(deviceMac_list);
deviceMac_list.clear();
deviceMac_list.addAll(hash_mac);
private ArrayList<String> deviceMacList = new ArrayList<>();
private ArrayList<String> deviceNameList = new ArrayList<>();

for(int i = 0; i < deviceMac_list.size(); i++){
    if (deviceMac_list.get(i).equals(device_mac)){
        return;
    }
}
Log.d(TAG, Arrays.toString(rxData));
float a = 23.4f;
String s = Float.toString(a) ;

int a = 10;
String s = Integer.toString(i); 

double a = 10.1234;
String s = Double.toString(i);
String s = "169";
byte b = Byte.parseByte(s);
short t = Short.parseShort(s);
int i = Integer.parseInt(s);
long l = Long.parseLong(s);
Float f = Float.parseFloat(s);
Double d = Double.parseDouble(s);
上一篇 下一篇

猜你喜欢

热点阅读