Updated : Java code snippet for Slider

Java code snippet for Slider