Here you can find the source of subStrTime(String strTime)
public static String subStrTime(String strTime)
//package com.java2s; /******************************************************************************* * Copyright (c) 2005, 2006 IBM Corporation and others. All rights reserved. This program and the * accompanying materials are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * //w ww . ja v a2 s .com * Contributors: IBM Corporation - initial API and implementation *******************************************************************************/ public class Main { public static String subStrTime(String strTime) { String inTime = strTime.substring(0, 2); String outTime = strTime.substring(2, strTime.length()); return inTime + ":" + outTime; } }