请教一个关于数字转换为字符串的问题
目的:   把1位数的整数输出为字符串形式,   如   01,   02   等.   
 多谢   
 只有20分了.
------解决方案--------------------方法1: 使用DecimalFormat    
 DecimalFormat df = new DecimalFormat( "00 "); 
 System.out.println(df.format(intValue));   
 方法2: 
 String v =  "00 " + intValue; 
 System.out.println( v.substring(v.length-2));
------解决方案--------------------public class NumToString { 
 	public static void main(String[] args) { 
 		for (int i=1; i <=9; i++) { 
 			System.out.println( "0 "+i); 
 		} 
 	} 
 }
------解决方案--------------------int a = 1; 
 String s =  "0 "+a;
------解决方案--------------------int k = 1; 
 String s = String.format( "%02d ", k);
------解决方案--------------------忘记说了,如果需要三位数或其他更多的长度,只要将 %02d 中的 2 改为其他的数就行了。JDK 1.5 新加的挺方便的。
------解决方案--------------------String v =  "00 " + intValue; 
 System.out.println( v.substring(v.length-2));
------解决方案--------------------楼上答得都不错 不说了 来捞分