Add public class snippet

java: Add public class snippet