Here you can find the source of formats(String pattern, Object... args)
public static String formats(String pattern, Object... args)
//package com.java2s; /**/*from www . j a va 2s . com*/ * Project: webXValidate * * File Created at 2011-12-23 * $Id$ * * Copyright 2008 Alibaba.com Corporation Limited. * All rights reserved. * * This software is the confidential and proprietary information of * Alibaba Company. ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Alibaba.com. */ import java.text.MessageFormat; public class Main { private MessageFormat mf; public static String formats(String pattern, Object... args) { return MessageFormat.format(pattern, args); } public String format(Object... args) { return mf.format(args); } }