Revision 38615
branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/actioninfo/impl/test.java | ||
---|---|---|
1 |
package org.gvsig.andami.actioninfo.impl; |
|
2 |
|
|
3 |
import java.text.MessageFormat; |
|
4 |
import java.util.Formatter; |
|
5 |
|
|
6 |
public class test { |
|
7 |
|
|
8 |
/** |
|
9 |
* @param args |
|
10 |
*/ |
|
11 |
public static void main(String[] args) { |
|
12 |
|
|
13 |
MessageFormat f = new MessageFormat("{0,number,##########}"); |
|
14 |
Long num = new Long(12); |
|
15 |
Object[] testArgs = { num}; |
|
16 |
String s = f.format(testArgs); |
|
17 |
System.out.println(s); |
|
18 |
|
|
19 |
s = String.format("%010d", num); |
|
20 |
System.out.println(s); |
|
21 |
} |
|
22 |
|
|
23 |
} |
Also available in: Unified diff