Java tutorial
//package com.java2s; import java.util.Locale; public class Main { public static String getThreadInfo() { return String.format(Locale.getDefault(), "[thread_id:%d name=%s]", Thread.currentThread().getId(), Thread.currentThread().getName()); } }