Java Integer longValue()方法具有什么功能呢?
下文笔者将讲述 java.lang.Integer longValue()方法的功能简介说明,如下所示:
返回Integer对象的int值,并将其转换为long类型值返回
java.lang.Integer longValue()的功能
java.lang.Integer.longValue()的功能:返回Integer对象的int值,并将其转换为long类型值返回
java.lang.Integer.longValue()的语法
语法 public int longValue() 参数 无 返回值 返回Integer对象对应的int值转换为long类型返回例:
package com.java.other;
import org.junit.Test;
public class other {
/**
* java265.com Integer类的示例分享
*
* @throws Exception
*/
@Test
public void test() throws Exception {
Integer i = 90;
System.out.println(i.longValue());
}
}
------运行以上代码,将输出以下信息------
90
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。


