Here you can find the source of getInt(final Class> preferencesClass, final String preferenceName)
public static int getInt(final Class<?> preferencesClass, final String preferenceName)
//package com.java2s; //License from project: Apache License import java.util.prefs.Preferences; public class Main { public static int getInt(final Class<?> preferencesClass, final String preferenceName) { final Preferences preferences = getPreferences(preferencesClass); return preferences.getInt(preferenceName, 0); }//w w w .j ava 2 s. c o m public static Preferences getPreferences(final Class<?> preferencesClass) { final String preferenceGroup = preferencesClass.getName(); return getUserPreferences(preferenceGroup); } public static Preferences getUserPreferences(final String preferenceGroup) { final Preferences userRoot = Preferences.userRoot(); final Preferences preferences = userRoot.node(preferenceGroup); return preferences; } }