Java Format - Java NumberFormat.clone()








Syntax

NumberFormat.clone() has the following syntax.

public Object clone()

Example

In the following code shows how to use NumberFormat.clone() method.

import java.text.NumberFormat;
/*from   w w w.  ja va2s.  co  m*/
public class Main {
  public static void main(String[] args) throws Exception {
    NumberFormat numberFormat = NumberFormat.getPercentInstance();
    System.out.println(numberFormat.clone());
    
    
  }
}

The code above generates the following result.