Math 提供了大量的数学操作方法
Math类中所有的方法都是static 方法
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbAAAABtCAIAAABP+6M4AAAKNUlEQVR4nO2dQa6bOhuGuyeExDLQuRlFR2cBV0JRNpAoUqWqgyQbqCqif3zD8A7uJFlDGDdH6qhL6Ih/wAfYYINJSE5In0fvoAeM+bA/XmxDlU/f/zn8BgCA378/YYgAADkYIgCAgCECAAgYIgCAgCECAAgYIgCAgCECAAgYIgCAgCECAAgYIgCAgCECAAgYIgCAgCECAAgYIgCAgCECAAgYIgCA0G2I3/85IITQn6BP3x0M8cfPXwgh9PTCEBFCSIQhIoSQCENECCERhogQQqKxGeJ/X8PA84Pw838fHQlC6OmEISKEkAhDRAgh0WWGePj8l+cHXhhFYeD5gRd+Oajbc/0dl+X/97e+5d8voR94/l9f//3560cc+YHnB9E3MbvasWUBzw/CzzGGiBC6la4yRN37xPVUFUbpYog1FZbXvhchhIbTlYYYfSs2fov0LWJkuXM5GaK4ZzFOzP+UavOS1VkwRITQ8Lpuyvyl3FW3PL2M25TZ4UDWEBFCt9Owhqj5VD6aG9gQTSdCCKFB9OAjRPk3I0SE0B00lCE6rSHW3rE4GCJriAih+2kwQ/yhfDTTeMtcGpkuB0M0VoshIoRuoeEMUdlu+JZQ3fXX12+uU+ZfP36qnsh3iAihG2ps/1MFIYRuJgwRIYREGCJCCIkwRIQQEmGICCEkwhARQkiEISKEkMjJEBFC6E/Qp+8OhpgBAPwBYIgAAAKGCAAgYIgAAAKGCAAgYIgAAAKGCAAgYIgAAAKGCAAgYIgAAAKGCAAgYIgAAAKGCAAgYIgAAAKGCAAg3NUQT9vQD8JNatqX5L/O7L1sDbtP29C4/dEYIM7WdngK0s3E8yfrU2NHMjfmhrV8Jxfn2xDsZxfFDB/LvUeIlqQvd0f3N4JkHiW3LH8JH9EOdyTdzBtmka5f5vse5d34wHw7bcPZzRMFBuYqQ0zmnh+Em2T9Enh+4FVP4yTyAy/PhtM2VJ/DyTz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6t9k/eCwqt6ZvMx6Vfm+ZLZEYTmEqWbVDQbqZqJMs9RWKbHzJR4uyJUrKQ/JlxLLkfK3aaON0He9eL27AskMNbzZrh6/i0uYMaeBgiIZIrIPN5vvfgtK4M/21QPvhhqqMZ3HMBDUYYyLVZmBut4yEZHnL3N65Su9kLafOjstgulxNrb0wTvifKs/Hfqa+Yn5APuK2OazGfaPeD9feaX1HNFowxGeh+OxG+xbngSjGLB/z2do53j3Fmv+tuKB3MEQAgKcGQwQAEDBEAAABQwQAEDBEAAABQwQAEDBEAAABQwQAEDBEAAABQwQAEDBEAADh/0Byed5ZaL+tAAAAAElFTkSuQmCC" alt="" />
重点看这个操作,四舍五入
System.out.println(Math.round(-16.5)) ; -16
System.out.println(Math.round(16.5)) ; 17
大于等于0.5进位。
Random类
取得随机数的类 java.util 包
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYcAAADfCAIAAACS1ogHAAARnUlEQVR4nO3cvW7rRhrG8b2gdAcGfAPpDKUMYBgGUhuQcgELG6eRKglIl0KB5FJqFARY1ZYKuTOSxq0MGVDhm+AWJIfz8Q5F6oN+Hf1/OMDq0MPhiEfz+J2hsv9JAECT/3z2AADAQSoB0IVUAqALqQRAF1IJgC6kEgBdSCUAupBKAHQhlQDoUjeV1uPb6/HbSYaSJEnyNr65vH8SXwA4D8pqpTCDSCXgzBxQK72Nby6/XVx+u7j89rBIkrfxze147TXz2tjsuMleLx6yxvdP1ErAudo7lRYPl3Y83T95gXU7XgttLEIqsYIDcJx9pcXD5f1Tkqwfr28e14n1ImxTIJUASA5Kpafv2erswiTI7Xhd3sYglQBIDlnB5VtFRXCsx7fX44XZYBLb5EglAJJ9U8nPlKw4Wj9eX1x+y5ZvkTa5Ytdp/Xh9QSoBSJLkkBVcGkAXl98ubu8fbu2aqEgfoY2VMuanN4/jh6La4hkccNbqppL1WA0ATqBGKmWlTfGlJAA4PmXf7QZw9kglALqQSgB0IZUA6EIqAdCFVAKgC6kEQBdSCYAup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f93EeFtXEi4UAAAAAElFTkSuQmCC" alt="" />
产生100之内的随机整数
Random rand = new Random() ;
for(int x = ; x < ; x ++){
System.out.println(rand.nextInt() ) ;
}
大整数操作类
如果现在操作的数据值很大,想到double
System.out.println(Double.MAX_VALUE * Double.MAX_VALUE) ;
超过double 结果是Infinity
如果超过double当然不能用double保存,现在只有String来保存这个数字。
在java中考虑到了这类情况,专门有了
BigInterger 和 BigDecimal
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAACyCAIAAAAMIKdpAAAPVUlEQVR4nO2bv47aShSH7wOlWyHxAulWpIy0QkipkSAPcAXahq1YKV0KrvCWbEMU6VIDBelWN822ICJR8BK+hT0zZ2bOGPtgwLv8PkUKa+af7fP5zBj7rxgAIOKvIoXXUesu2pxqKIfZRM16b04/AHA5CslzaSAPqBLSzLOJmvWbWv2mVr/pL+J4EzVb0dop5pTxm3rqJd82n9bxgnyOuS7iRT/9szffRM16r38fahyAcyCTZ9GvU4t6c8erVrRmyjhN3dTuF+pb+jkpyVW3PijNFr2a8RaA83H8mmfRr/fmcbx+ukuiWX/wywSaop+JM351dtqGKRy4EHJ55mrWVNMB3YrW2WX4poLyMF1AHlAZxNM2tdIwsbuOWnfRQi9+2DJ+U3FAHq465AFVQiSPG7tp6K+f7syKP1DGbcr9rORhq0MeUCWE07bEk1r9ptbq9Vs0RRhJmDJOmsqctnFdrKOWudsGecBlKSQPu5oH4ErJK0+aB3BTGADFm3rCAIAqAXkAEAJ5ABACeQAQAnkAEAJ5ABACeQAQAnkAEAJ5ABACeQAQAnkAEAJ5ABACeQAQAnkAEAJ5ABACeQAQIpTnx9+fP3w0/z59/219/XPw4ePnDx+73/4rYYjHDIz8G/wgxX5/7/obM1Dli+3Rj78/f/j73yLDB2+J4vL8988nNjq//GMEqqI81nhOL8/vb18+f/gIed4zReX592swNEmgVFQeL0PmBvIAn2LyqBhi8wy5kDPyONbZl3wnm9HGD9a1SeUJtaBCmcs8ppdP3387u+DKowb89Sf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p5u99aE6YDhHND9E8M3zZVn/9GxygWWl1rlpKnR+xWTDaa3mXD6rSRJ5Nlpc6X7EupU6UA51z/bO1HKjdiCbC3pNVTGt4DITUT+T3eYd5tTprfECYB+1OC5dzcWMiQx4dQJweZbjNNmCadko06rQYyxboaNBTjdVxbDUpehRT5jMwXedRC6w+my6rdIG64cKjq8x2XCWo+aTfjVhBikRZ5e+nvN+xMeASnXqjpiefgeH1AAnfeUuT95XUbKVhmpuCh07F40WvXrrWvbWquZ6fNSex3cutchpYoJpU3M2XHR56pJjSSHJqxS/1NmTokwCzMFvoFzmtScqlzGwjieIOZ6+xmTDWVzNhXzNIqAC9H20wY+ePjMO9U7as1QdLjfnTwniiFXNbaGrhiZvBKkyuqrcnMyItRHZa5HTZAsmc/ay4VpHbk51gF8J2tVuwTyUnA4yD3VYpdal4pqb+xWTDWdhNVc/8yePKLi6mtv8EJt3pEO9k0xvjbuBln1zoYqwb547d1dza+iyqrzyGLNtbm7fN5eyYOrJR7n7z+wvu0+TZavanCQab1BcPXPTze2bkx3gzhFqlm17xKZJJJereY/Y+Axg0ab9jMmGs4SdllnxkoPw+gcvJYZ3Wgg/xTu/yo0Vv00hUdZlz2TmvQWpOvdOi1hFPtggN7eFLtObEJs2DtA66n5izM3JwU7iqBP3tXdaLLW4adJK0n2u14BphdAzy+UchgibilEdEKMn7RFTGasWfMt8WdY/M5vGwOrT3aBpQv42PiYeyTp+C7qttFnE5odgYKXBX69DxGQDgZpvFeKPe1voMtT8E4O/BoeIyWYDNQcAAB+AmgMAgA9AzQEAwAeg5gAA4ANQcwAA8IH/AXF1ff1Tx8GFAAAAAElFTkSuQmCC" alt="" />
BigInteger bigA = new BigInteger("") ;
BigInteger bigB = new BigInteger("");
System.out.println(bigA.add(bigB)) ;
System.out.println(bigA.subtract(bigB));
数字(数学)操作类 Math Random 类 ,大数字操作类的更多相关文章
-
猜数字游戏,判断输入的数字与系统产生的数字是否一致(Math.random()与if嵌套循环)
package com.summer.cn; import java.util.Scanner; public class Test041509 { /** * java 随机数 Math * Mat ...
-
使用内置对象Math.random实现猜数字游戏
function getRandom(min,max){ return Math.floor(Math.random()*(max-min+1))+min; //得到两个数之间的随机整数,包含实 ...
-
初识Java(Java数字处理类-大数字运算)
一.大数字运算 在 Java 中提供了大数字的操作类,即 java.math.BigInteger 类与 java.math.BigDecimal 类.这两个类用于高精度计算,体重 BigInteg ...
-
java大数字操作:BigInteger,BigDecimal(浮点型)
java大数字操作: BigInteger:大数字整型的 BigDecimal(浮点型):大数字小数的,也适用大的整数 BigInteger: String num1 = "10038182 ...
-
使用Math.random()函数生成n到m间的随机数字
使用js生成n到m间的随机数字,主要目的是为后期的js生成验证码做准备,Math.random()函数返回0和1之间的伪随机数 讲解: 本文讲解如何使用js生成n到m间的随机数字,主要目的是为后期的j ...
-
Math.random取随机整数
Math.random可以随机获取0-1的数字,今天用的需要给id随机赋值,小数不好控制,就只取整. 网上很多是 int i=(int)(Math.random()*100): 报错: 后找到 var ...
-
随机产生1-12的整数 , 根据产生整数输出一下该月份的季节信息(Math.random()和if语句的应用)
package com.summer.cn; /** * @author Summer *随机产生1-12的整数 , 根据产生整数输出一下该月份的季节信息 */ public class Test04 ...
-
常用类--Date日期类,SimpleDateFormat日期格式类,Calendar日历类,Math数学工具类,Random随机数类
Date日期类 Date表示特定的时间,精确到毫秒; 构造方法: public Data() public Date(long date) 常用方法: public long getTime() pu ...
-
Date日期类,Canlendar日历类,Math类,Random随机数学类
Date日期类,SimpleDateFormat日期格式类 Date 表示特定的时间,精确到毫秒 常用方法 getTime() setTime() before() after() compareT ...
随机推荐
-
JavaScript函数的概念
函数是这样的一段代码,它只定义一次,但可能被执行或调用任意多次. JavaScript函数是参数化的:函数的定义会包含形参,这些参数在函数的整体中像局部变量一样工作.函数调用时会为形参提供实参的值.除 ...
-
试听笔记:javascript入门精通
一.数据类型 1.原始类型:number.string.boolean.null.undefined 2.对象类型:Object (Function.Array.Date...) P.类型隐式转换:' ...
-
[think in java]知识点学习
java中 全部数值都有正负号,不存在无符号整数. java中的基本类型存储在堆栈中. 其它对象存储在堆中. java确保数组会被初始化,并且不能在它的范围之外被訪问. 下面代码在c和c++中是合法的 ...
-
css案例学习之table tr th td ul li实现日历
效果 代码 <html> <head> <title>Calendar</title> <style> <!-- .month { b ...
-
yii 使用 mongodb 小工具 YiiMongoDbSuite
YiiMongoDbSuite下载链接: http://www.yiiframework.com/extension/yiimongodbsuite/ 如果你的yii和mongodb它已经建立了一个良 ...
-
docker 创建docker用户组,应用用户加入用户组
在Linux系统下使用docker,为了避免每次输入命令都需要sudo,可以把用户加入docker用户组 创建docker用户组 sudo groupadd docker 普通用户加入docker用户 ...
-
react-native-background-job——让你的react-native项目实现后台运行
安排在您的应用处于后台时运行JavaScript的后台任务. 即使应用程序已关闭,任务也会运行,默认情况下,也会在重新启动后继续存在. 这个库依赖于React Native的HeadlessJS ,目 ...
- c#基础思维导图
-
java 数组声明方法
//数组 public class Test16{ public static void main(String args[]){ //声明一: int [] x; x = new int[3];// ...
-
CSU 1808: 地铁 最短路
题目链接: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1808 1808: 地铁 Time Limit: 5 SecMemory Limit: ...