Here you can find the source of setPrefBoolean(Object context, final String key, final boolean value)
public static void setPrefBoolean(Object context, final String key, final boolean value)
//package com.java2s; //License from project: Open Source License import java.util.prefs.Preferences; public class Main { private static Preferences prefs; public static void setPrefBoolean(Object context, final String key, final boolean value) { prefs = Preferences.userRoot().node(context.getClass().getName()); prefs.putBoolean(key, value);/*from w w w.ja v a 2 s.c o m*/ } }