get Preference - Java java.util.prefs

Java examples for java.util.prefs:Preferences

Description

get Preference

Demo Code


//package com.java2s;
import java.util.prefs.Preferences;

public class Main {
    public static String getPreference(String key, String defaultValue) {
        Preferences root = Preferences.userRoot();
        return root.get(key, defaultValue);
    }//from www  . j a  v a2  s  .  co  m
}

Related Tutorials