Here you can find the source of removePref(String prefName, Object obj)
public static void removePref(String prefName, Object obj)
//package com.java2s; // under the terms of the GNU Lesser General Public License as published by import java.util.prefs.Preferences; public class Main { public static void removePref(String prefName, Object obj) { Preferences prefs = Preferences.userNodeForPackage(obj.getClass()); prefs.remove(prefName);// www . jav a 2s.c om } }