Java Programing laungage

java.util Projects

java.util Project 1

Access the User Type Preferences in Subtree of Preference Node

In this page of the tutorials, we are going to learn that how a user can access the User preferences.

Previous Home Next
adplus-dvertising

Here we are going to create it easier to understand the step of the access system preferences process by the example. If we consider the example it will be display the preferences of the user as root type="user" after that it will be display the node name as in the output is "Sam", "R4RTechSoft Solution" and then it will display the map tree. by this way we can access the user preferences.

Example


package r4r;
import java.io.IOException;
import java.util.*;
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
public class accessuserpreferences {
	
public static void main(String[] args) throws IOException, BackingStoreException { Preferences rootnode = Preferences.userRoot(); rootnode.exportSubtree(System.out); } }
Previous Home Next