Update Sharedpreferences.java

Replaced if else with switch case due to issue #9
Merge pull request #10 from edelworksgithub/edit

Update Sharedpreferences.java