Java Format - Java NumberFormat.hashCode()








Syntax

NumberFormat.hashCode() has the following syntax.

public int hashCode()

Example

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

//w  w w .  ja  va  2 s. c  o m
import java.text.NumberFormat;
import java.util.Locale;

public class Main {
  public static void main(String[] args) throws Exception {
    NumberFormat numberFormat = NumberFormat.getPercentInstance(Locale.CANADA);
    System.out.println(numberFormat.hashCode());
  }
}

The code above generates the following result.