Java Convert Integer to Long
By:Roy.LiuLast updated:2019-08-11
In Java, we can use Long.valueOf() to convert an Integer to a Long
TestInteger.java
package com.mkyong.example; public class TestInteger { public static void main(String[] args) { Integer num = 1 ; System.out.println(num); // 1 Long numInLong = Long.valueOf(num); System.out.println(numInLong); // 1 |
From:一号门
RELATED ARTICLES
- java获取文件扩展名的误区
- java航空订票系统
- JAVA性能监控与调优参考文档链接
- google authenticator 一次性验证码TOTP java 代码实现
- JAVA https ssl 连接验证服务端证书
- Java里各种路径的区别:getPath(), getCanonicalPath()
- java编译的包兼容性问题Unsupported Major.Minor Version 51.0
- Java 根据年号和第几周得到开始时间和结束时间
- Java8来了,回顾一下Java7的一些特性.
- java执行命令行或者shell脚本,批处理的基本方法
- java正则表达式匹配多行文本
- Eclipse下OutOfMemoryError:Java Heap Space问题解决方法
- java 与富文本编辑器 fckeditor 结合的例子(源码下载)
- java RSA公钥加密,私钥解密算法例子.
- spring datasource 密码加密后运行时解密的解决办法
- java web应用防止sql 注入的常规方法
- java 防止 XSS 攻击的常用方法总结.
- java网页程序采用 spring 防止 csrf 攻击.
- java 任意两个时间差,天数,小时数,分钟数,秒数
- 简单方法合并两个java list
COMMENTS