Updated : Java code snippet for Slider

Java code snippet for Slider
Merge pull request #1237 from mgmanikandan87/patch-6

Updated : Java code snippet for Slider