class Clock { int H,M,S; void setTime(int h,int m,int s){ H=h; M=m; S=s; } void showTime(){ System.out.println(H+":"+M+":"+S); } public static void main(String []args){ Clock t1=new Clock(); t1.setTime(10,10,10); t1.showTime(); } }