Home Java Example Java Util Removing a Preference from a Preference Node



Removing a Preference from a Preference Node
Posted on: January 7, 2009 at 12:00 AM
This section demonstrates you to remove the preference from a preference node.

Removing a Preference from a Preference Node

     

This section demonstrates you to remove the preference from a preference node. You can see in the given example that in order to remove the preference from the Preference node 'Roseindia', we have used the method clear() of class Preference which removes all of the preferences (key-value associations) from the preference node.

Here is the code of RemovePreference.java

import java.util.prefs.*;
public class RemovePreference{
public static void main(String[] args) throws Exception{
 Preferences prefs = Preferences.userRoot().node("/Roseindia");
 prefs.clear();
 }
}

Download Source Code:

Related Tags for Removing a Preference from a Preference Node:
cclassreferenceioreferencesmethodsedremoveorderassociationskeyvaluethisssonodemovepreferencesexamplecleartoexamkey-valuerefciassociationearesectionocicandemousefromceinnoasmtroscaosclesemallmerateratesreferxawhichxampssoeeatkishallivmplprediaeaarstrsocvassrdrenthavstatialuhatfepleplprpreferencemovndodeonomo


More Tutorials from this section

Ask Questions?    Discuss: Removing a Preference from a Preference Node  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.