基本类型包装,及运算
2018-12-12 本文已影响0人
893705279802

Integer类parseInt方法

Integer类构造方法

Integer类其他方法


获取int的最大值和最小值

自动装箱和自动拆箱,JDK1.5新特性(了解)

自动装箱和自动拆箱练习题


System类方法exit

System类方法gc

System类方法getProperties

System类方法arraycopy

Math类的方法_1
static double sqrt(double d)
返回参数的平方根

static double pow (double a, double b)
a的b次方

static double floor(double d)
返回 < 或 = 参数d的 最大整数

static double ceil(double d)
返回 > 或 = d的最小整数

static int abs(int i)
获取参数的绝对值

Math类的方法_2
static double round(doubl d)
获取参数的四舍五入,取整数

static double random() 返回随机数 0.0-1.0之间
来源,也是Random类 nextDouble();

Arrays工具类
static String toString(数组)
* 将数组变成字符串

static int binarySearch(数组, 被查找的元素)
* 数组的二分搜索法
* 返回元素在数组中出现的索引
* 元素不存在, 返回的是 (-插入点-1)

static void sort(数组)
* 对数组升序排列

BigInteger类四则运算
BigInteger b1 = new BigInteger("5581613661405146");




BigDecimal类概述

BigDecimal实现三则运算
计算b1+b2的和,调用方法add

计算b3-b2的差,调用方法subtract

计算b5*b6的成绩,调用方法 multiply

BigDecimal类实现除法
