import java.util.*; class TimeToSec { static int h; static int m; static int s; public TimeToSec() { int h = 0; int m = 0; int s = 0; } public static void main(String arr[]) { int sec; System.out.println("Conversion of time value into second(s)"); System.out.println("Enter time value :"); Scanner scan = new Scanner(System.in); System.out.println("Enter the value of hour : "); h= scan.nextInt(); System.out.println("Enter the value of minute : "); m = scan.nextInt(); System.out.println("Enter the value of second : "); s = scan.nextInt(); sec = h*3600+m*60+s; System.out.println("Time after calculating into second(s) : "); System.out.println(sec); } }