
import java.lang.*; 

class ThreadID {
    public static void main(String[] args) throws Exception {
        long tid = Thread.currentThread().getId();
        System.out.format("Tid = %d %n", tid);
        
        int cores = Runtime.getRuntime().availableProcessors();
        System.out.format("Cores = %d %n", cores);
        
        System.out.format("<enter> to exit");
        System.in.read();
    }

}
            