Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread.currentThread.getID()  RSS feed

 
Ranch Hand
Posts: 38
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys, I tested this method and it returns 9, but I only have two (including main()). Can anyone tell how this ID are generated. Thanks
 
Sheriff
Posts: 9611
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know the exact logic of thread ids but there are other daemon threads run by the JVM as well like the garbage collector...
 
Matheus Souza
Ranch Hand
Posts: 38
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ankit Garg wrote:I don't know the exact logic of thread ids but there are other daemon threads run by the JVM as well like the garbage collector...



Hm...alright. I figured out that the question that I was answering was not about this method, was about the flow of the program.

Thnaks.
 
Don't MAKE me come back there with this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!