File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread t = primitive value? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread t = primitive value?" Watch "Thread t = primitive value?" New topic
Author

Thread t = primitive value?

Monica Dharwad
Greenhorn

Joined: Aug 14, 2006
Posts: 8
Can Thread t = primitive value?
I guess no but want to confirm.
Thanks a lot.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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.


[My Blog]
All roads lead to JavaRanch
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Monica Dharwad wrote:Can Thread t = primitive value?

Provided, "primitive value" is an object of some class, then with casting you can do it


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread t = primitive value?