    

 ## On this page

  

 

 # getPreference

 Last update: 30.07.2026 

public [getPreference](get-preference.md)(prefName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html)): [Variant](./../-variant/index.md)

gets a preference

#### Return

a preference value

#### Parameters

prefNamethe name of the preference