提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
将long原语转换为Long对象
public class Main { public static void main(String[] args) {/**来自 时 代 J a v a**/ long i = 10; /* Use Long constructor to convert long primitive type to Long object. */ Long lObj = new Long(i); System.out.println(lObj); } }