store Preference - Java java.util.prefs

Java examples for java.util.prefs:Preferences

Description

store Preference

Demo Code


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

public class Main {
    public static void storePreference(String key, String value) {
        Preferences root = Preferences.userRoot();
        root.put(key, value);// w w  w. j a v  a2  s  .c o m
    }
}

Related Tutorials