Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.prefs.Preferences;

public class Main {
    public static void main(String[] argv) throws Exception {

        Preferences prefs = Preferences.userNodeForPackage(java.lang.String.class);

        Preferences node = prefs.parent(); // /java
        node = node.parent(); // null

        String[] names = null;
        names = prefs.childrenNames();

        for (int i = 0; i < names.length; i++) {
            node = prefs.node(names[i]);
        }
    }
}