zoukankan      html  css  js  c++  java
  • 部分System类,Math类,Arrays类,BigInteger

    System.arraycopy(arr1,索引1,arr2,索引2,数量x);

    把arr1从索引1位置之后开始,替换掉arr2的索引2位置开始之后,数量为x

    System.exit(0);

    终止虚拟机运行

    System.gc()

    垃圾回收

    Math.abs() 绝对值

    Math.ceil() 向上取整

    Math.floor() 向下取整

    Math.round() 四舍五入

    Arrays类:

    Arrays.sort(arr) 按升序排序

    Arrays.toString() 转为字符串格式的数组

    Arrays.binarySearch(arr,xxx);

    在arr数组中查找xxx数,有则返回索引,没有则返回应该在的位置的负索引值

    BigInteger

    BigInteger b1=new BigInteger("1000000000000");

    BigInteger b2=new BigInteger("1000000000000");

    sysout(b1.add(b2)) 加 

    BigInteger sub=b1.subtract(b2);减

    b1.multiply(b2) 乘

    b1.divide(b2) 除

  • 相关阅读:
    leetcode167 Two Sum II
    leetcode18 4Sum
    leetcode15 three sum
    leetcode-1-Two Sum
    SQL优化——select
    Hadoop 集群搭建
    虚拟机中的两台主机怎么相互拷贝文件
    doker5
    docker4
    docker3
  • 原文地址:https://www.cnblogs.com/god3064371/p/11585879.html
Copyright © 2011-2022 走看看