Here you can find the source of getPreference(String key, Boolean defaultValue)
public static boolean getPreference(String key, Boolean defaultValue)
//package com.java2s; import java.util.prefs.Preferences; public class Main { private static Preferences prefs = null; public static String getPreference(String key, String defaultValue) { return prefs.get(key, defaultValue); }// ww w. j a v a2 s . co m public static Integer getPreference(String key, Integer defaultValue) { return prefs.getInt(key, defaultValue); } public static boolean getPreference(String key, Boolean defaultValue) { return prefs.getBoolean(key, defaultValue); } }