Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread t = primitive value?

 
Monica Dharwad
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can Thread t = primitive value?
I guess no but want to confirm.
Thanks a lot.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How could it be possible ? What makes you think that it could possibly be ?
Wrapper classes, like java.lang.Integer can take advantage of auto-boxing to do such an assignment. Not classes other than wrapper classes.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monica Dharwad wrote:Can Thread t = primitive value?

Provided, "primitive value" is an object of some class, then with casting you can do it
 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monica Dharwad wrote:I guess no but want to confirm.

Why don't you give a try yourself? Self practicing is very important to pass any certification test.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic