转自:
下文笔者讲述decode()方法的功能简介说明,如下所示
decode()方法的功能
decode()方法的功能: 将一个String值转换为Long类型并返回 decode()语法: public static Long decode(String str); 参数: 字符串str:待解码的字符串 返回值 此方法的返回类型为long 它返回Long 其中Long由String类型的参数表示的long值
例:
package com.java265.other; public class Test21 { /** * java265.com示例代码分析 */ public static void main(String[] args) { String str = "898"; System.out.println("Long.decode(str): " + Long.decode(str)); } } ------运行以上代码,将输出以下信息----- 898