1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
/* Get Current Thread Example This Java example shows how to get reference of current thread using currentThread method of Java Thread class. */ public class GetCurrentThreadExample { public static void main(String[] args) { /* * To get the reference of currently running thread, use * Thread currentThread() method of Thread class. * * This is a static method. */ Thread currentThread = Thread.currentThread(); System.out.println(currentThread); } } /* Output of the example would be Thread[main,5,main] */ |
I don’t really understand what the array returned means. Can anybody explain me? I tried to get the information on internet but i found anything related to this array