Test
1
public class Test {
2
public static void main(String[] args){
3
System.out.println (Math.ceil(-1.999999999991)); //1.0
4
System.out.println (Math.ceil(1.999999999991));//2.0
5
System.out.println (Math.floor(-1.00001));//-2.0
6
System.out.println (Math.floor(1.00001));//1.0
7
8
System.out.println (Math.ceil(0));//0.0
9
}
10
}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
6
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
7
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
8
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
9
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
10
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
1
SELECT 1 FROM DUAL;
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
posted on 2008-07-16 12:23 dolphin_bobo 阅读(154) 评论(0) 编辑 收藏 举报