十六进制转换成十进制????????????
程序代码:
package wuyu; import java.util.Scanner; public class ww { public static void main(String[] args) { //System.out.println("请输入一个十六进制数"); Scanner in = new Scanner(System.in); int h = in.nextInt(); ww(h); } public static void ww(int h) { System.out.println(h); int i = Integer.valueof("h",16); System.out.println( +i); } }
-----------------------------------------------------
我写的程序报错了,好像“h”有问题,大家帮帮我啊??