Here you can find the source of putPrefsBoolean(Preferences prefs, String key, boolean value, boolean def)
public static void putPrefsBoolean(Preferences prefs, String key, boolean value, boolean def)
//package com.java2s; import java.util.prefs.Preferences; public class Main { public static void putPrefsBoolean(Preferences prefs, String key, boolean value, boolean def) { if (value != def) prefs.putBoolean(key, value); else// w w w . j a va2 s .c o m prefs.remove(key); } }