Java API Tutorial - Java ResourceBundle.clearCache()








Syntax

ResourceBundle.clearCache() has the following syntax.

public static final void clearCache()

Example

In the following code shows how to use ResourceBundle.clearCache() method.

import java.util.Locale;
import java.util.ResourceBundle;
/*from  ww w .ja va 2  s. com*/
public class Main {

   public static void main(String[] args) {

      ResourceBundle bundle = ResourceBundle.getBundle("hello", Locale.US);

      System.out.println(bundle.getString("hello"));

      ResourceBundle.clearCache();

   }
}