Code example for PropertyResourceBundle

Methods: getString

0
	public String get(String key) {
		try { 
			return labels.getString(key);
		} 
		catch (MissingResourceException e) {
			String text = labelsFallback.getString(key);
			LOG.warning("Used fallback label for " + key);
			return text;
		} 
	} 
 
	/** 
	 * A shortened form of Labels.getInstance().get() 
	 */ 
	public static String getLabel(String key) {
		return getInstance().get(key);
	} 
} 
Experience pair programming with AI  Get Codota for Java