Java tutorial
//package com.java2s; public class Main { public static int[] convertToIntegerTime(String time) { final String t = time; int[] result = new int[2]; result[0] = Integer.valueOf(t.substring(0, 2)); result[1] = Integer.valueOf(t.substring(3, 5)); return result; } }