获得徽章 7
赞了这篇文章
赞了这篇文章
赞了这篇沸点
【今日解读:高内聚/低耦合】架构设计中常见词,你知道它是什么意思吗?点开下图一起来看看
LeanCloud 「后端开发词典」上线,希望以通俗易懂的方式为大家解读后端开发中遇到的常见术语,助力程序员轻松开发。 更多开发术语查询请戳:
leancloudblog.com
LeanCloud 「后端开发词典」上线,希望以通俗易懂的方式为大家解读后端开发中遇到的常见术语,助力程序员轻松开发。 更多开发术语查询请戳:
展开
评论
4
赞了这篇文章
赞了这篇沸点
赞了这篇文章
/**
* Returns the value of the {@code long} argument;
* throwing an exception if the value overflows an {@code int}.
*
* @param value the long value
* @return the argument as an int
* @throws ArithmeticException if the {@code argument} overflows an int
* @since 1.8
*/
public static int toIntExact(long value) {
if ((int)value != value) {
throw new ArithmeticException("integer overflow");
}
return (int)value;
}
* Returns the value of the {@code long} argument;
* throwing an exception if the value overflows an {@code int}.
*
* @param value the long value
* @return the argument as an int
* @throws ArithmeticException if the {@code argument} overflows an int
* @since 1.8
*/
public static int toIntExact(long value) {
if ((int)value != value) {
throw new ArithmeticException("integer overflow");
}
return (int)value;
}
展开
1
点赞
赞了这篇沸点
JVM