code: public static String getPreference( String preferenceKey, String defaultValue ) {
          Preferences preferences = Preferences.userRoot().node(PREFS_NODE_NAME);
          String preference = preferences.get(preferenceKey, defaultValue);
          return preference;
      }
docs: Get from preference.
  
  @param preferenceKey
  the preference key.
  @param defaultValue
  the default value in case of <code>null</code>.
  @return the string preference asked.