Java tutorial
//package com.java2s; public class Main { /** * * @param input * @return */ public static int fourToTime(String input) { int min = Integer.parseInt(input.substring(0, 2)); int sec = Integer.parseInt(input.substring(2, 4)); return min * 60 + sec; } }