山西省建设局官方网站,中国移动采购与招标网,python自学网,做新闻门户网站需要什么全屏java.lang.Long.getLong(String nm) 方法确定具有指定名称的系统属性的long值。如果没有具有指定名称的属性#xff0c;如果指定名称为空或null#xff0c;或者该属性没有正确的数字格式#xff0c;则返回null。声明以下是java.lang.Long.getLong()方法的声明public sta…全屏java.lang.Long.getLong(String nm) 方法确定具有指定名称的系统属性的long值。如果没有具有指定名称的属性如果指定名称为空或null或者该属性没有正确的数字格式则返回null。声明以下是java.lang.Long.getLong()方法的声明public static Long getLong(String nm)参数nm -- 这是属性名。返回值此方法返回属性的long值。异常NA例子下面的例子显示java.lang.Long.getLong()方法的使用。package cn.sxt;import java.lang.*;public class LongDemo {public static void main(String[] args) {// determines the Long value of the system propertyString str sun.arch.data.model;System.out.println(Long.getLong(str));// prints nullstr lang;System.out.println(Long.getLong(str));}}让我们来编译和运行上面的程序这将产生以下结果64null分享到0评论